graphmod: stop building a list out of branchgroupiter
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 21 Aug 2015 16:03:25 -0700
changeset 26092 014044dbd4e8
parent 26091 60bbd4f9abd1
child 26093 204131131766
graphmod: stop building a list out of branchgroupiter Not only does this defeat the purpose of having `branchgroupiter` an iterable, but this also makes revs something else than a smartset preventing to use revs.min() in the call to reachablerevs.
mercurial/graphmod.py
--- a/mercurial/graphmod.py	Mon Aug 24 15:40:42 2015 -0700
+++ b/mercurial/graphmod.py	Fri Aug 21 16:03:25 2015 -0700
@@ -247,7 +247,8 @@
         if firstbranchrevset:
             firstbranch = repo.revs(firstbranchrevset)
         parentrevs = repo.changelog.parentrevs
-        revs = list(groupbranchiter(revs, parentrevs, firstbranch))
+        revs = groupbranchiter(revs, parentrevs, firstbranch)
+        revs = revset.baseset(revs)
 
     for rev in revs:
         ctx = repo[rev]