[RFC] merge - common_ancestor generation

Robert Collins robertc at robertcollins.net
Mon Mar 6 21:01:21 GMT 2006


On Mon, 2006-03-06 at 09:23 -0500, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > I'd like to alter common_ancestor generation via changing combined_graph
> > to use the weave prelude of each repository rather than reading the
> > revision files: except in the presence of ghosts the information will be
> > identical with the proposed consistency check I've put forward in my
> > reconcile branch.
> 
> I can't find any merge request for your common_ancestor changes, yet the
> code has hit the mainline.

[MERGE] faster common ancestor, emailed out 1442 GMT+1000 yesterday.

> I was +1 on the concept, but I am -1 on this implementation, because
> you've changed the behaviour of revision_graph.  It has clients that
> expect it to refer to ghosts, as I told you.  With your changes, there
> is no way to produce a revision graph with ghosts.
> 
> I would prefer that you supply a new operation for
> revision_graph_without_ghosts, and make common_ancestor use *that*, or
> at the very least, provide the old behaviour in a
> revision_graph_with_ghosts function.

I will add that today and submit for review. There are no tests for that
functionality which was how I overlooked it durig coding - sorry.

Now, for the contract - do you want:
 * it to include 'null:' ? I think it should.
 * The descendants graph? I think this is not needed for most callers,
but we can have a single utility function to convert a graph that mayu
contain ghosts into a descendants graph.
 * a list of roots ? [which would be found by scanning for parentless
nodes]
 * a separate list of ghosts or not? I think this should be included.

I plan to put this on repository because its code varies with the
repository format.

So, my ideal api is:
repository.revision_graph_with_ghosts(['A', 'B'])
->
  {'A':['C'],  
   'B':['D'],
   'D':['C'],
   },
  set(['C'])

Meaning: A has parents ['C']
         B has parents ['D']
         D has parents ['C']
         C is a ghost
         no revisions are connected to null: directly. [in fact null: is
not reachable].


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/20060307/69d76a59/attachment.pgp 


More information about the bazaar mailing list