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
I'd like the posthook for `darcs amend-record` to receive a meaningful
I will implement tests and an implementation for this issue.
The following patch sent by Sebastian Fischer <email@example.com> updated issue issue2312 with
* resolve issue2312: posthooks for 'record' and 'amend-record' should receive DARCS_PATCHES
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.