Mercurial > evolve
changeset 2210:37bd878d2e58
more explicite name in revsfromrange
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 24 Mar 2017 03:30:14 +0100 |
parents | d25d39b88c7f |
children | ecb46c7ee281 |
files | hgext3rd/evolve/stablerange.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py Fri Mar 24 05:15:25 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Fri Mar 24 03:30:14 2017 +0100 @@ -231,21 +231,22 @@ def revsfromrange(self, repo, rangeid): revs = self._revsinrangecache.get(rangeid) + headrev, index = rangeid if revs is None: if self.rangelength(repo, rangeid) == 1: - revs = [rangeid[0]] + revs = [headrev] else: # get all revs under heads in stable order # # note: In the general case we can just walk down and then request # data about the merge. But I'm not sure this function will be even # call for the general case. - allrevs = self._stablesortcache.get(rangeid[0]) + allrevs = self._stablesortcache.get(headrev) if allrevs is None: - allrevs = stablesort(repo, [rangeid[0]]) - self._stablesortcache[rangeid[0]] = allrevs + allrevs = stablesort(repo, [headrev]) + self._stablesortcache[headrev] = allrevs # takes from index - revs = allrevs[rangeid[1]:] + revs = allrevs[index:] self._revsinrangecache[rangeid] = revs # sanity checks assert len(revs) == self.rangelength(repo, rangeid)