[darcs-users] darcs patch: Refactor logic flow in `main`.
Eric Kow
kowey at darcs.net
Thu Jan 15 10:11:18 UTC 2009
On Thu, Jan 15, 2009 at 20:16:53 +1100, Trent W.Buck wrote:
> Sending this one separately because it's relatively long.
>
> Thu Jan 15 14:45:12 EST 2009 Trent W. Buck <trentbuck at gmail.com>
> * Refactor logic flow in `main`.
Actually this fails our regression tests, so please resubmit!
I had misread your patch as being being just changing around the argv
and length stuff. But only when tests started failing did I notice.
Apologies for the shoddy review on my part. Good thing we have
automated testing.
Refactor logic flow in `main`.
------------------------------
> - when (length argv == 1 && (argv!!0 == "--exact-version")) $
> - do putStrLn $ "darcs compiled on "++__DATE__++", at "++__TIME__
> - putStrLn context
> - exitWith $ ExitSuccess
> - when (length argv == 1 && argv!!0 == "--commands") $
> - do list_available_commands
> - exitWith $ ExitSuccess
That these two (exitWith $ ExitSuccess) had gone away... I suspect that
this was related to the tests failing, i.e. that some test and possibly
some plausible usage of darcs involves the use of -v or --commands as
the first of many arguments passed to the darcs executable.
Could you correct this? Maybe this would be a good chance to sneak in
the pattern-match and case idea?
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20090115/c17e2b6b/attachment.pgp
More information about the darcs-users
mailing list