[RFC] "short" revision id spec.

Martin Pool mbp at sourcefrog.net
Wed Apr 11 04:02:37 BST 2007


On 4/11/07, John Arbash Meinel <john at arbash-meinel.com> wrote:
> For bzr.dev there seems to be enough entropy that you only really need
> to supply 4 characters (often 2 or 3 is enough).

That looks nice.

> So I have a few questions about the spec:
>
> 1) Is it reasonable to merge this into bzr.dev? I think it is generally
> useful, but I wanted to play with it a bit first.

I haven't looked at the code but the feature sounds reasonable.

> 2) I don't really like 'srevid:' and grabbing 'r:' seemed a little bit
> greedy. I'm okay with it in a plugin, because plugins let you do things
> like be greedy. Because it doesn't have to work for everyone everywhere.
> Any thoughts on what the prefix should be?

I think using a one letter prefix is ok.

>
> It might be possible to implement this, such that we don't even need a
> prefix (it would work as a catch-all). But I would rather not do that yet.
>
> 3) r:x--y versus r:x-y or other forms. I chose -- because I prefer the
> look of it. The single dash looked like I was actually trying to match
> part of the revision id, rather than only trying to match the prefix and
> suffix.
>
> Obviously the real matching power is only in the suffix. The reason I
> write them as prefix--suffix, is because that gives me the human being a
> bit more of a handle on the object. It works better in graphing, because
> I can associate 'that revision was committed by Aaron', even though the
> committer doesn't really matter, it works better than "ae948".

> Actually, my favorite "short" form is: user-date-hash. So my graphs use:
>
>   john-20050918-c6498
>   robertc-20050919-51340

So does this have to match the start of the hash part, or the end of
it, or anything within?

... I wonder if we should in fact allocate ids with just the username
component of the committer, leaving out the domain...

-- 
Martin



More information about the bazaar mailing list