stablesort: clarify subcall to the exclusive side
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 20 Dec 2017 12:19:59 +0100
changeset 3317 a950e6cc5e9e
parent 3316 76e5b5ae6864
child 3318 058120e9d32f
stablesort: clarify subcall to the exclusive side Before doing deeper rework of this logic, we tackle the simplest parts.
hgext3rd/evolve/stablesort.py
--- a/hgext3rd/evolve/stablesort.py	Wed Dec 20 13:18:49 2017 +0100
+++ b/hgext3rd/evolve/stablesort.py	Wed Dec 20 12:19:59 2017 +0100
@@ -388,12 +388,9 @@
 
                 rev = current
                 jumps = []
-                for rev in self._process_exclusive_side(lower_parent,
-                                                        higher_parent,
-                                                        cl.findmissingrevs,
-                                                        parents,
-                                                        tiebreaker,
-                                                        jumps):
+                process = self._process_exclusive_side
+                for rev in process(lower_parent, higher_parent, cl, parents,
+                                   tiebreaker, jumps):
                     yield rev
 
                 jumps.append((rev, lower_parent, JUMPFINAL))
@@ -402,11 +399,10 @@
 
                 current = lower_parent
 
-    def _process_exclusive_side(self, lower, higher, findmissingrevs,
-                                parents, tiebreaker, jumps):
+    def _process_exclusive_side(self, lower, higher, cl, parents, tiebreaker,
+                                jumps):
 
-        exclusive = findmissingrevs(common=[lower],
-                                    heads=[higher])
+        exclusive = cl.findmissingrevs(common=[lower], heads=[higher])
 
         stack = []
         seen = set()