# HG changeset patch # User Pierre-Yves David # Date 1490322614 -3600 # Node ID 37bd878d2e58ea49fc7d8e356689331d88c11918 # Parent d25d39b88c7f8958a920234d74ed6b0c3e09aace more explicite name in revsfromrange diff -r d25d39b88c7f -r 37bd878d2e58 hgext3rd/evolve/stablerange.py --- 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)