darcs

Issue 2312 posthooks for 'record' and 'amend-record' should receive DARCS_PATCHES

Title posthooks for 'record' and 'amend-record' should receive DARCS_PATCHES
Priority feature Status resolved
Milestone 2.10.0 Resolved in 2.10.0
Superseder Nosy List sebfisch
Assigned To
Topics

Created on 2013-03-08.10:25:35 by sebfisch, last changed 2013-06-08.22:21:21 by noreply.

Messages
msg16742 (view) Author: sebfisch Date: 2013-03-08.10:25:34
Unlike posthooks for other commands, the posthooks for `darcs record` and 
`darcs amend-record` cannot access the environment variable DARCS_PATCHES.

I'd like the posthook for `darcs record` to receive the same DARCS_PATCHES 
variable that a posthook for a corresponding pull, push, send or apply 
receives.

I'd like the posthook for `darcs amend-record` to receive a meaningful 
DARCS_PATCHES variable.

I will implement tests and an implementation for this issue.
msg16844 (view) Author: noreply Date: 2013-06-08.22:21:20
The following patch sent by Sebastian Fischer <mail@sebfisch.de> updated issue issue2312 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2312: posthooks for 'record' and 'amend-record' should receive DARCS_PATCHES 
Ignore-this: 8cd06d851c072ac1a7f2879490fd59b9

I have extended the 'record' and 'amend-record' commands to supply the
environment variable DARCS_PATCHES to posthooks.

The contents of DARCS_PATCHES is computed and provided by a new
function `Darcs.UI.Commands.Util.setChangesEnvAfter` that is used to
wrap the 'record' and 'amend-record' commands.

This function reads the repository before and after the executed
command. It uses the existing function
`Darcs.Patch.Depends.findCommonWithThem` to compute the changes made
by the command and `Darcs.UI.Commands.setEnvDarcsPatches` to provide
them to posthooks.
History
Date User Action Args
2013-03-08 10:25:35sebfischcreate
2013-03-08 13:36:13sebfischsetassignedto: sebfisch ->
2013-03-10 10:39:00sebfischsetstatus: needs-testcase -> has-patch
2013-06-08 22:21:21noreplysetstatus: has-patch -> resolved
messages: + msg16844
resolvedin: 2.10.0