On Sun, Nov 16, 2008 at 3:38 PM, David Roundy <[EMAIL PROTECTED]> wrote:

> Sun Nov 16 18:05:21 EST 2008  David Roundy <[EMAIL PROTECTED]>
>  * don't run posthook if the command terminated with exitWith.
>  This is a change in policy, and means that for instance darcs pull -a will
>  only run the posthook if there are patches to pull.  It does mean that we
>  have to be careful how we exit commands, since this adds new meaning to
>  "exitWith ExitSuccess", but my audit of the code shows that this is only
>  used when I wouldn't want to run the posthook anyhow.


What is the motivation for this change?  As you've described it, it sounds a
bit scary.  We now have to be careful about when we 'exitWith ExitSuccess'
and it changes behavior of things like pull as you mention.  So the natural
question for me, does this fix a bug?  If so, what one?

If the motivation is purely the case of 'pull' and there not being patches,
then wouldn't a better solution be to have the posthook for pull take the
list of patches as an environment variable and then have the command check
if it should run?  This strikes me as a more general and more consistent
behavior (always running the hook on success).  Also, think this latter
approach has been asked for in the past several times.

  Actually, I found two gratuitous uses of exitWith ExitSuccess, and have
>  removed them.


I wonder if exitWith is something we should check for in haskell_policy?  It
does seem like it could make some types of cleanup harder to get right.
Although, braket would still be safe.

Thanks,
Jason
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to