55
51
_revision_graph = _strip_NULL_ghosts(parent_map)
61
55
if is_null(last_revid):
64
58
_merge_sort = merge_sort(
65
59
_revision_graph, last_revid, generate_revno=True)
67
for info in _merge_sort:
68
seq, revid, merge_depth, revno, end_of_merge = info
61
for (seq, revid, merge_depth, revno, end_of_merge) in _merge_sort:
69
62
_full_history.append(revid)
70
63
revno_str = '.'.join(str(n) for n in revno)
71
parents = _revision_graph[revid]
72
_rev_indices[revid] = len(_rev_info)
73
_rev_info.append([(seq, revid, merge_depth, revno_str, end_of_merge), (), parents])
64
_revno_revid[revno_str] = revid
65
_revision_info[revid] = (
66
seq, revid, merge_depth, revno_str, end_of_merge)
75
70
for revid in _revision_graph.keys():
76
if _rev_info[_rev_indices[revid]][0][2] == 0:
71
if _revision_info[revid][2] == 0:
78
73
for parent in _revision_graph[revid]:
79
c = _rev_info[_rev_indices[parent]]
81
c[1] = c[1] + (revid,)
74
_where_merged.setdefault(parent, set()).add(revid)
83
76
log.info('built revision graph cache: %r secs' % (time.time() - z))
85
return (_rev_info, _rev_indices)
78
return (_revision_graph, _full_history, _revision_info,
79
_revno_revid, _merge_sort, _where_merged)