view tests/test-revlog-ancestry.py.out @ 39473:b6db2e80a9ce

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.
author Boris Feld <boris.feld@octobus.net>
date Thu, 06 Sep 2018 17:00:28 -0400
parents f88c60e740a1
children a60dae060bc8
line wrap: on
line source

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