Numbering of non-mainline revisions

James Westby jw+debian at jameswestby.net
Thu Mar 13 00:16:53 GMT 2008


On Wed, 2008-03-12 at 17:29 -0500, John Arbash Meinel wrote:
> To give it a bit of a workout, I'm putting together a trivial plugin that I've
> uploaded to:
> lp:~jameinel/+junk/bzr-test-dotted
> 
> I'll experiment with it a bit and let you know.
> 
> So far I keep breaking it (I keep getting KeyError exceptions). But I'll see if
> I can't get it working and then evaluate its performance, etc. Certainly I could
> use it as a starting point.

Hi John,

Attached is a patch that should fix up a lot of the problems.

I have noticed that one thing it does badly is build up
a huge queue of the right hand parents of mainline, and then
walk back popping off those that are earlier than the pivot_node.
This is obviously really bad when numbering recent revisions.
Using paired revision walkers may help with this somewhat.
The other option is to not to walk back down the list, but
to bisect it, which should be a lot more efficient. Is that
feasible?

I have found one revision where the algorithm differs, see

ian.clatworthy at canonical.com-20080306154056-9ayd1xgpscgklouk

This is A in

    2
    |\
    | A
    | |
    | B
    | |\
    | | C
    | | |
    |/  /
    1--'

The current algorithm gives it

A = 1.2.2  
B = 1.2.1 
C = 1.1.1

I give it

A = 1.1.2
B = 1.1.1
C = 1.2.1

I haven't thought it through yet, but I don't know if the former
is compatible with my algorithm.

Thanks,

James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dotted.diff
Type: text/x-patch
Size: 6861 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080313/fb7deb64/attachment.bin 


More information about the bazaar mailing list