[darcs-devel] darcs patch: added posthook command line switches (and 2 more)

David Roundy droundy at abridgegame.org
Wed Aug 3 15:08:28 PDT 2005


On Wed, Aug 03, 2005 at 09:42:45AM -0700, dagit at codersbase.com wrote:
> David Roundy <droundy at abridgegame.org> writes:
> > Hmmm.  It needn't be *quite* so different, since the command line will also
> > accept `apply --posthook-command "echo test"`.  And it used to be worse,
> > since the defaults file didn't even allow the "--" before
> > --posthook-command.  But it would be nice to make it even more flexible.
> > The trouble is that the actual parsing  of the command line is done by the
> > shell followed by getopt, neither of which are particularly simple.  But we
> > ought to be able to go far by (a) allowing '=' as a separator after --flag,
> > and (b) ignoring enclosing single or double quotes.  Would you care to
> > implement this?
> 
> Sure, I'm guessing those changes will be pretty quick and painless to
> implement.

That would be great! Even better if you could also add a few tests to check
that the defaults are properly parsed.

> Should I also make 'darcs' optional at the beginning of the line?

That's starting to get a little silly... but sometimes silly can be good!
:) It sounds reasonable to me.  I can only see it causing problems if we
ever add a subcommand called "darcs".  But since that'll only happen if
there is some sort of virus that will cause us all to go insane, I don't
think we need to worry about that.
-- 
David Roundy




More information about the darcs-devel mailing list