2
from bzrlib import branch
5
b = branch.Branch.open(path)
8
rev_id = b.last_revision()
10
gcindex = r.revisions._index
11
return b, rev_key, gcindex
15
b = branch.Branch.open(path)
18
rev_id = b.last_revision()
20
bindex = r.revisions._index._graph_index._indices[0]
21
return b, rev_key, bindex
24
b = branch.Branch.open(path)
27
rev_id = b.last_revision()
29
cindex = r.revisions._index._graph_index
30
return b, rev_key, cindex
34
def ancestry_from_get_ancestry(path):
35
b, rev_key, cindex = get_cindex(path)
36
parent_map, missing_keys = cindex.get_ancestry([rev_key])
40
def ancestry_from_get_parent_map(path):
41
b, rev_key, gcindex = get_gcindex(path)
42
search_keys = set([rev_key])
46
next_parent_map = gcindex.get_parent_map(search_keys)
47
next_parent_keys = set()
48
map(next_parent_keys.update, next_parent_map.itervalues())
49
parent_map.update(next_parent_map)
50
next_parent_keys = next_parent_keys.difference(parent_map)
52
# print '%4d\t%5d\t%5d' % (generation, len(search_keys),
54
search_keys = next_parent_keys