Some initial comments:

On Wed, Aug 02, 2006 at 18:14:40 -0700, Nathaniel Gray wrote:
> Aside from some aesthetic objections, the only serious problem I see is 
> that changing the method used to execute the posthook from 
> System.Cmd.system to System.Process.runProcess will break any posthook 
> command that counts on being processed by the shell.

Another issue is that System.Process.runProcess only showed around GHC
6.4(.1?), whereas we're supporting an earlier version, the one in Debian
stable.

What would probably be the right thing to do is to edit Workaround.hs so
that it exports runProcess.  If we are using GHC 6.2, runProcess could
likely call Exec.exec.  Anyway, in the long run, it would be nice if we
switched to using runProcess everywhere.

> In particular, the first patch touches every command, changing their
> types and making them return empty environments.

Oh my! I wonder if you could achieve a similar effect with something
softer, say some kind of cleverness involving apply --dry-run (not that
we have apply --dry-run, but somebody could work on that)

On the other hand... maybe it would be useful in general if darcs
commands returned some information instead of just exiting.

1. What would you all think if we had a mechanism like this, only
   renamed from PostHookEnvironmentVariable to DarcsCmdStatus,
   and implemented as a record (instead of an attribute value list)
   ?  See below.

2. What else might we use it for?

data DarcsCmdStatus = DarcsCmdStatus { patchesApplied :: Maybe Int
                                     , cmdExitCode :: ExitCode }

(I can never decide on the best indentation for these things)

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgp6cSUWprbwU.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to