comparison mercurial/cmdutil.py @ 22807:cd43195ef876

getgraphlogrevs: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 00:20:00 -0700
parents 65ccc733d58e
children 722117c8e023
comparison
equal deleted inserted replaced
22806:65ccc733d58e 22807:cd43195ef876
1854 # returns the revision matching A then the revision matching B. Sort 1854 # returns the revision matching A then the revision matching B. Sort
1855 # again to fix that. 1855 # again to fix that.
1856 revs = matcher(repo, revs) 1856 revs = matcher(repo, revs)
1857 revs.sort(reverse=True) 1857 revs.sort(reverse=True)
1858 if limit is not None: 1858 if limit is not None:
1859 limitedrevs = revset.baseset() 1859 limitedrevs = []
1860 for idx, rev in enumerate(revs): 1860 for idx, rev in enumerate(revs):
1861 if idx >= limit: 1861 if idx >= limit:
1862 break 1862 break
1863 limitedrevs.append(rev) 1863 limitedrevs.append(rev)
1864 revs = limitedrevs 1864 revs = revset.baseset(limitedrevs)
1865 1865
1866 return revs, expr, filematcher 1866 return revs, expr, filematcher
1867 1867
1868 def getlogrevs(repo, pats, opts): 1868 def getlogrevs(repo, pats, opts):
1869 """Return (revs, expr, filematcher) where revs is an iterable of 1869 """Return (revs, expr, filematcher) where revs is an iterable of