[MERGE] DWIM revspecs

John Arbash Meinel john at arbash-meinel.com
Sat Jul 25 16:45:39 BST 2009

Hash: SHA1

Matthew D. Fuller wrote:
> [ This is not actually ready for merging; BB tag added just for
>   tracking ]
> This bundle adds the ability for revspec's to DWIM for the more common
> types, rather than requiring extra verbosity for everything but
> revnos.
> The lookup order is:
> 1) If numeric (same test as previously), try revno
> 2) Tag
> 3) Revid
> 4) Date
> 5) Branch
> 6) Fail!
> I decided on the lookup order both in terms of relative commonality
> (and thus a good guess at to likelihood of what the user wanted, if
> multiple hits were possible), and in terms of relative expense of
> calculation.  Revno is no more expensive than before (well, maybe a
> funciton call or two more overhead, but...).  Tags are cheap to fail;
> if it's not in the file, it ain't there.  Not 'till revid do we have
> to pull the whole history to necessarily fail.

So I haven't looked over the change, but I would like to offer that we
*allow* prefixes to avoid ambiguity, but if there isn't one, then we
will fall back to DWIM behavior.

Otherwise I'm fairly okay with DWIM for revspecs.


Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the bazaar mailing list