[RFC] merge - common_ancestor generation

Aaron Bentley aaron.bentley at utoronto.ca
Tue Mar 7 02:15:55 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
| Now, for the contract - do you want:
|  * it to include 'null:' ? I think it should.

Yes

|  * 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.

I want a way to get the descendant graph.  A utility is okay.  It seems
like it would be more expensive that way, though.

|  * a list of roots ? [which would be found by scanning for parentless
| nodes]

The graph root should always be the NULL_REVISION, except in cases where
the NULL_REVISION is unreachable due to ghosts, in which case we can fail.

|  * a separate list of ghosts or not? I think this should be included.

nice-to-have.

| 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].

I would expect to throw in that circumstance.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEDOza0F+nu1YWqI0RAhgsAJ0SbCOMfj07EA8inlWqMUO1F7fIlACcDOPm
qJXT5l2C63NRlF2NDrJyMxM=
=HNeV
-----END PGP SIGNATURE-----




More information about the bazaar mailing list