[MERGE/RFC] Add dotted-decimal revision numbers to merge_sorted output

Robert Collins robertc at robertcollins.net
Thu Sep 7 23:17:12 BST 2006


On Thu, 2006-09-07 at 09:12 -0500, John Arbash Meinel wrote:
> Aaron Bentley wrote:
> > Robert Collins wrote:
> 
> ...
> 
> >>> Now, because we assign sequences during the pre-order portion of the
> >>> traversal, ALL the nodes that existin in the portion reachable by J are
> >>> assigned first - as they would be when K did not exist. So they are
> >>> stable.
> >>>
> >>> The nodes for the Z subgraph - which may indeed join with the J subgraph
> >>> - are visited later, and thus cannot affect the numbers assigned to the
> >>> components of J.
> > 
> > So, if I understand correctly, the nodes appear in the order that they
> > were merged into the target revision, which makes them stable.  But
> > nodes which have not are not ancestors of a given revision have no revno
> > with respect to that revision, because they were not merged by it.
> > 
> > Is that right?
> > 
> > Aaron
> 
> Nodes that are not ancestors have no dotted revno, as I understand it.
> 
> Probably we could make a different version of the algorithm that could
> take a sorted list of tips, and generate dotted revnos for everything.
> (Sort of like pretending that you did a merge).
> 
> All we really need is a stable ordering of parents, and then we have a
> stable ordering of dotted revnos.

Its easy: just add a node to the graph for your pseudo tip:
graph = branch.repository.revision_graph()
graph['TIP']=[rev1, rev2, rev3]
iterator = merge_sorted(graph, 'TIP', generate_revno=True)

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060908/de13cc47/attachment.pgp 


More information about the bazaar mailing list