changeset 33781:c7da57bbae96

dagop: comment why revancestors() doesn't heapify input revs at once I wondered why we're doing this complicated stuff without noticing the input revs may be iterated lazily in descending order. c1f666e27345 showed why.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Jun 2017 17:16:02 +0900
parents b9e2269aeff8
children 08e2793d9f65
files mercurial/dagop.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dagop.py
+++ b/mercurial/dagop.py
@@ -26,6 +26,9 @@
     else:
         cut = None
     cl = repo.changelog
+
+    # load input revs lazily to heap so earlier revisions can be yielded
+    # without fully computing the input revs
     revs.sort(reverse=True)
     irevs = iter(revs)
     h = []