# HG changeset patch # User Pierre-Yves David # Date 1490270019 -3600 # Node ID 781ab704dc59a84c6afe49e95a4e79ceb1862d2c # Parent f82a398162f5d2ec24cf32945f8d0ea2c4c86d9c merge-slicing: avoid doing the same work twice We have already computed the list of revision in that bottom slice as 'hrevs' so we do not need to compute it a second time. diff -r f82a398162f5 -r 781ab704dc59 hgext3rd/evolve/stablerange.py --- a/hgext3rd/evolve/stablerange.py Thu Mar 23 14:16:43 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Thu Mar 23 12:53:39 2017 +0100 @@ -422,8 +422,7 @@ hrevs = [r for r in bottomrevs if r in subset] start = self.depthrev(repo, h) - len(hrevs) entry = (h, start) - entryrevs = [r for r in bottomrevs if r in subset] - self._revsinrangecache[entry] = entryrevs # update cache + self._revsinrangecache[entry] = hrevs # update cache result.append(entry) result.append(top) return result