D4507: ancestors: add nullrev to set from the beginning
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Sep 8 04:41:02 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8eb2145ff0fb: ancestors: add nullrev to set from the beginning (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4507?vs=10840&id=10842
REVISION DETAIL
https://phab.mercurial-scm.org/D4507
AFFECTED FILES
mercurial/ancestor.py
CHANGE DETAILS
diff --git a/mercurial/ancestor.py b/mercurial/ancestor.py
--- a/mercurial/ancestor.py
+++ b/mercurial/ancestor.py
@@ -311,15 +311,14 @@
If inclusive is True, the source revisions are also yielded. The
reverse revision number order is still enforced."""
- seen = set()
+ seen = {nullrev}
revs = self._initrevs
parentrevs = self._parentrevs
stoprev = self._stoprev
schedule = heapq.heappush
nextitem = heapq.heappop
see = seen.add
- see(nullrev)
if self._inclusive:
visit = [-r for r in revs]
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list