Show More
@@ -74,6 +74,14 b' def _nonoedipal_parent_revs(cl, rev):' | |||
|
74 | 74 | return p1, p2 |
|
75 | 75 | |
|
76 | 76 | |
|
77 | def _parents(cl, rev): | |
|
78 | p1, p2 = _nonoedipal_parent_revs(cl, rev) | |
|
79 | if p2 == nullrev: | |
|
80 | return p1, p2 | |
|
81 | ||
|
82 | return _sorted_parents(cl, p1, p2) | |
|
83 | ||
|
84 | ||
|
77 | 85 | def _stable_tail_sort_naive(cl, head_rev): |
|
78 | 86 | """ |
|
79 | 87 | Naive topological iterator of the ancestors given by the stable-tail sort. |
@@ -91,14 +99,10 b' def _stable_tail_sort_naive(cl, head_rev' | |||
|
91 | 99 | while cursor_rev != nullrev: |
|
92 | 100 | yield cursor_rev |
|
93 | 101 | |
|
94 |
p |
|
|
95 |
if p |
|
|
96 |
cursor_rev = p |
|
|
97 | elif p2 == nullrev: | |
|
98 | cursor_rev = p1 | |
|
102 | px, pt = _parents(cl, cursor_rev) | |
|
103 | if pt == nullrev: | |
|
104 | cursor_rev = px | |
|
99 | 105 | else: |
|
100 | px, pt = _sorted_parents(cl, p1, p2) | |
|
101 | ||
|
102 | 106 | tail_ancestors = ancestor.lazyancestors( |
|
103 | 107 | cl.parentrevs, (pt,), inclusive=True |
|
104 | 108 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now