[PATCH] -r 1-100 not -r1:100 please...
Rusty Russell
rusty at rustcorp.com.au
Sat May 28 03:00:46 BST 2005
On Fri, 2005-05-27 at 20:14 +0200, Denys Duchier wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
>
> > I agree that '-' is a decent separator character, but I think it is also
> > frequently used as a joining character. We have thought about it and
> > discussed it, and it doesn't really seem like the best character.
It really is, and it's fairly easy for a parser to deal with it. For
example, consider the worst case:
-r uuid:a-b-c-d-700
the "uuid" revisions number parser can tell you that it has consumed
everything up to the "-700". The parser should probably be written that
way anyway, so you can try each one in turn when it's not an integer,
when someone forgot to prepend "uuid" or whatever.
-r -5: is the kind of shorthand only a programmer could love, and -r -5-
is only marginally worse (I take back my incorrect comments about
parsing this, BTW, it works). Far better is "last:5", using the same
namespace idea as uuid, date, etc. It also maps well to standard
literate usage of colons.
Cheers,
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
More information about the bazaar
mailing list