comparison mercurial/graphmod.py @ 26092:014044dbd4e8

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 21 Aug 2015 16:03:25 -0700
parents 62371c539c89
children 9cf65f43b49b
comparison
equal deleted inserted replaced
26091:60bbd4f9abd1 26092:014044dbd4e8
245 firstbranchrevset = repo.ui.config( 245 firstbranchrevset = repo.ui.config(
246 'experimental', 'graph-group-branches.firstbranch', '') 246 'experimental', 'graph-group-branches.firstbranch', '')
247 if firstbranchrevset: 247 if firstbranchrevset:
248 firstbranch = repo.revs(firstbranchrevset) 248 firstbranch = repo.revs(firstbranchrevset)
249 parentrevs = repo.changelog.parentrevs 249 parentrevs = repo.changelog.parentrevs
250 revs = list(groupbranchiter(revs, parentrevs, firstbranch)) 250 revs = groupbranchiter(revs, parentrevs, firstbranch)
251 revs = revset.baseset(revs)
251 252
252 for rev in revs: 253 for rev in revs:
253 ctx = repo[rev] 254 ctx = repo[rev]
254 parents = sorted(set([p.rev() for p in ctx.parents() 255 parents = sorted(set([p.rev() for p in ctx.parents()
255 if p.rev() in revs])) 256 if p.rev() in revs]))