##// END OF EJS Templates
ancestors: actually iterate over ancestors in topological order (issue5979)...
ancestors: actually iterate over ancestors in topological order (issue5979) This code previously used a dequeue logic, the first ancestors seen were the first ancestors to be emitted. In branching/merging situations, it can result in ancestors being yielded before their descendants, breaking the object contract. We got affected by this issue while working on the copy tracing code. At about the same time, Axel Hecht <axel@mozilla.com> reported the issue and provided the test case used in this changeset. Thanks Axel. Running `hg perfancestors` does not show a significant difference between the old and the new version.

File last commit:

r39509:b6db2e80 default
r39509:b6db2e80 default
Show More
test-revlog-ancestry.py.out
19 lines | 298 B | text/plain | TextLexer
/ tests / test-revlog-ancestry.py.out
Ancestors of 5
4 2 0
Ancestors of 6 and 5
4 3 2 1 0
Ancestors of 5 and 4
4 2 0
Ancestors of 7, stop at 6
6
Ancestors of 7, including revs
7 6 5 4 3 2 1 0
Ancestors of 7, 5 and 3, including revs
7 5 3 6 4 2 1 0
Descendants of 5
7 8
Descendants of 5 and 3
6 7 8
Descendants of 5 and 4
5 7 8