[RFC] ghost aware apis
Robert Collins
robertc at robertcollins.net
Tue Feb 28 05:37:49 GMT 2006
Ok, after chatting with aaron I think the following ghost aware apis are
what we need, and we should aim to get them into the mainline as soon as
convenient...
For the following samples the revision graph is:
{3:[2],
2:[1,0],
1:[0],
0:[],
}
and revisions 1 and 0 are ghosts, and we have no cache of ancestry data
for ghosts.
A replacement for getting the ancestry for a revision that is ghost
aware, lets say its called get_ancestry_ghosts. This returns a list of
the topologically sorted ancestors of revision_id, and all the ghosts in
that list.
That is:
get_ancestry_ghosts(3) -> [0, 1, 2, 3], set([0, 1])
get_ancestry_ghosts(1) -> [1], set([1])
get_ancestry_ghosts(0) -> [0], set([0])
Secondly, an api to get the revision graph as a map which will also
return a set of the ghosts:
get_ancestry_graph(3) -> {3:[2], 2:[1,0], }, set([0, 1])
get_ancestry_graph(1) -> {}, set()
Thoughts? sound good?
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/20060228/e1262f5c/attachment.pgp
More information about the bazaar
mailing list