[RFC][PATCH] New style of revision id

Goffredo Baroncelli kreijack at alice.it
Thu Oct 26 19:09:33 BST 2006


On Thursday 26 October 2006 10:54, Erik Bågfors wrote:
> On 10/26/06, Alexander Belchenko <bialix at ukr.net> wrote:
> > Goffredo Baroncelli пишет:
[...]
> > > The new revision-id is in the form:
> > >
> > > <user>@<host>-<yyyymmddhhmmss>-<sha1sum>
> >
> > After discussion with git folks I think it's better to use form:
> >
> > <sha1sum>-<user>@<host>-<yyyymmddhhmmss>
> >
> > In this case unique id can be easily autocompleted or shortened to (say
> > so) 10 chars ;-). And this could be useful to using in visualisation
> > tools like bzrtools' graph-ancestry plugin.
I like the idea of a short revid for the selection( when passed to command 
line interactively ). But I don't like the short revision-id for automatic 
tool.... I fear about hash collision

> I think this is better, but I'd also like all commands to be able to
> take the shortest unique identifier to each command.  So if the revid
> is
> 
> 9f472a5cfbc5fc77de3a39c5cecc0d09326d3e86-ghigo at venice-20061025202916
> 
> I would like to be able to run
> bzr branch -r revid:9f472a5c for example
> 
> Better yet, if -r finds a revision number that isn't a number, it
> could assume that it's a revid, so
> 
> bzr branch -r 15 would use revno 15
> bzr branch -r 9f472a5c would use the revid that matches...

I think that if an hash is composed only by numberm the euristic logic which 
you suggest can cause problem. I prefer to use a option like -R | --Revision 
for the revid; so

-r | --revision= 	if a specifier isn't used, the default is revno:
-R | --Revision=	if a specifier isn't used, the default is revid:

Moreover for the revid we can accept a revision-id shorter. But the revision 
specifier have to verify the non collision.

I checked, and today in bazaar the switch -R isn't used at all.

> 
> /Erik
> -- 
Goffredo
-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9




More information about the bazaar mailing list