Issue 2311 posthook for 'get' should run in created repo

Title posthook for 'get' should run in created repo
Priority feature Status resolved
Milestone 2.10.0 Resolved in 2.10.0
Superseder Nosy List sebfisch
Assigned To

Created on 2013-03-08.10:18:02 by sebfisch, last changed 2013-06-08.20:22:57 by noreply.

msg16741 (view) Author: sebfisch Date: 2013-03-08.10:18:00
When I run `darcs get` with a posthook, the posthook is run in the current 

I'd like the posthook to run in the newly created repository. See this discussion 
for more motivation: http://thread.gmane.org/gmane.comp.version-

I will write a test and an implementation for this issue.
msg16837 (view) Author: noreply Date: 2013-06-08.20:22:56
The following patch sent by Sebastian Fischer <mail@sebfisch.de> updated issue issue2311 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2311: posthook for 'get' should run in created repo 
Ignore-this: e340bfcfac76da2afe9c919b25c219e7

I have added a function `getPosthookDir` to `Darcs.UI.RunCommand` that
computes a working dir for posthooks based on the current directory
based on the name of the command and the directory in which the
command is run.

For most commands the previous behavior is retained. For the `get`
command, the newly created repository is used as working dir for

To avoid code duplication, I have exported `makeRepoName` from
`Darcs.UI.Commands.Get` and used it in the function `getPosthookDir`
to compute the name that darcs will use for the newly created

The newly added tests for issue2311 (which were previously failing)
now pass.
Date User Action Args
2013-03-08 10:18:02sebfischcreate
2013-03-08 13:36:02sebfischsetassignedto: sebfisch ->
2013-03-08 21:39:16sebfischsetstatus: needs-testcase -> has-patch
2013-06-08 20:22:57noreplysetstatus: has-patch -> resolved
messages: + msg16837
resolvedin: 2.10.0