On Wed, 4 Oct 2006, David Roundy wrote:

On Mon, Oct 02, 2006 at 10:53:27PM -0400, Dino Morelli wrote:
On Mon, 2 Oct 2006, David Roundy wrote:

Output would be like this:

[]                     -->  ""
["foo"]                -->  "--foo"
["foo", "bar"]         -->  "--foo or --bar"
["foo", "bar", "baz"]  -->  "--foo, --bar or --baz"
... commas from here on out ...

That sounds like an improvement.  But you might want to check whether darcs
currently has any code that would excersize this.  You could just make darcs
die on lists with length greater than one, and then run the test suite, and
that might trigger it.  I don't know if we test running --help with each
command, but we probably should, and that would definitely test this.

..or maybe I should leave it alone and find something else to do. :)

Perhaps, but this wouldn't be a bad change to have in there.  It's isolated
enough that the only danger would be if it's ever used to feed to darcs
input, which I don't think it is.


Ok, I am persuing this edit to DarcsCommands.get_long_option.

At the moment trying to follow backward through the code from that
function to see how and when it gets called.

When you say 'die on lists with length greater than one', do you mean on
executions of darcs with argument lists of more than one token? And die,
would I use the error function to make that happen?

I could also make a test that does the --help with each command. That
would be separate executions of darcs for each command?


A couple of days ago on IRC, kowey suggested that I could perhaps
think about issue161, that people really want it done. But this kind of
sounds like stuff that Tommy posted about on darcs-users today regarding
amend-record:

   Subject: Re: [darcs-users] Re: change patch summary

   ...

   I think darcs could be made to do this automatically, so you
   could amend-record a depended upon patch, with the "side effect"
   that all depending patches also change (as they must do). But it
   could be complicated to implement...


If that's what 161 is, I don't think I'm even remotely up for it yet
without learning how a lot of things work first. Sorry, Eric, but sounds
scary.


--
 .~.    Dino Morelli
 /V\    email: [EMAIL PROTECTED]
/( )\   irc: dwm
^^-^^   preferred distro: Debian GNU/Linux  http://www.debian.org

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

Reply via email to