33
33
from bzrlib.tuned_gzip import GzipFile
36
42
def topo_iter(vf, versions=None):
41
45
parents = vf.get_parent_map(versions)
42
51
def pending_parents(version):
43
54
return [v for v in parents[version] if v in versions and
45
56
for version_id in versions:
46
60
for parent_id in parents[version_id]:
47
61
descendants.setdefault(parent_id, []).append(version_id)
48
62
cur = [v for v in versions if len(pending_parents(v)) == 0]