--- a/hgext3rd/evolve/stablerange.py Sun Dec 10 03:58:22 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Sun Dec 10 04:48:15 2017 +0100
@@ -376,6 +376,12 @@
relevant_parent = min(p1, p2, key=tiebreaker)
return relevant_parent
+ def _parentrange(self, repo, rangeid):
+ stable_parent = self._stableparent(repo, rangeid[0])
+ stable_parent_depth = self.depthrev(repo, stable_parent)
+ stable_parent_range = (stable_parent, rangeid[1])
+ return stable_parent_depth, stable_parent_range
+
def _subranges(self, repo, rangeid):
headrev, initial_index = rangeid
# size 1 range can't be sliced
@@ -384,13 +390,12 @@
# find were we need to slice
slicepoint = self._slicepoint(repo, rangeid)
- stable_parent = self._stableparent(repo, headrev)
- stable_parent_depth = self.depthrev(repo, stable_parent)
- stable_parent_range = (stable_parent, initial_index)
-
# top range is always the same, so we can build it early for all
top_range = (headrev, slicepoint)
+ stable_parent_data = self._parentrange(repo, rangeid)
+ stable_parent_depth, stable_parent_range = stable_parent_data
+
# now find out about the lower range, if we are lucky there is only
# one, otherwise we need to issue multiple one to cover every revision
# on the lower set. (and cover them only once).