Rev 4643: Implement _GCGraphIndex.find_ancestry() in http://bazaar.launchpad.net/~jameinel/bzr/2.0rc2-419241-merge-sort
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 26 17:47:56 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.0rc2-419241-merge-sort
------------------------------------------------------------
revno: 4643
revision-id: john at arbash-meinel.com-20090826164751-9oczd52hqs2ir1au
parent: john at arbash-meinel.com-20090826164427-lrly8srccu1327oh
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0rc2-419241-merge-sort
timestamp: Wed 2009-08-26 11:47:51 -0500
message:
Implement _GCGraphIndex.find_ancestry()
This makes the code more similar between KnitVersionedFiles and GCVersionedFiles
which helps in the case that one might end up stacked on the other.
-------------- next part --------------
=== modified file 'bzrlib/groupcompress.py'
--- a/bzrlib/groupcompress.py 2009-08-26 16:44:27 +0000
+++ b/bzrlib/groupcompress.py 2009-08-26 16:47:51 +0000
@@ -1213,13 +1213,12 @@
# Note that this is identical to
# KnitVersionedFiles.get_known_graph_ancestry, but they don't share
# ancestry.
- parent_map, missing_keys = self._index._graph_index.find_ancestry(keys,
- 0)
+ parent_map, missing_keys = self._index.find_ancestry(keys)
for fallback in self._fallback_vfs:
if not missing_keys:
break
- (f_parent_map, f_missing_keys) = fallback._index._graph_index.find_ancestry(
- missing_keys, 0)
+ (f_parent_map, f_missing_keys) = fallback._index.find_ancestry(
+ missing_keys)
parent_map.update(f_parent_map)
missing_keys = f_missing_keys
kg = _mod_graph.KnownGraph(parent_map)
@@ -1841,6 +1840,10 @@
if missing_keys:
raise errors.RevisionNotPresent(missing_keys.pop(), self)
+ def find_ancestry(self, keys):
+ """See CombinedGraphIndex.find_ancestry"""
+ return self._graph_index.find_ancestry(keys, 0)
+
def get_parent_map(self, keys):
"""Get a map of the parents of keys.
More information about the bazaar-commits
mailing list