stablerange: move a utility function around
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 21:10:01 +0100
changeset 2198 ab392bd1c518
parent 2197 c4ece9c98dc4
child 2199 7da7c8c9169d
stablerange: move a utility function around It make more sense to have this small function earlier in the series
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 21:09:28 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 21:10:01 2017 +0100
@@ -129,6 +129,10 @@
 ### Stable Range computation  ###
 #################################
 
+def _hlp2(i):
+    """return highest power of two lower than 'i'"""
+    return 2 ** int(math.log(i - 1, 2))
+
 def subrangesclosure(repo, heads):
     """set of all standard subrange under heads
 
@@ -387,10 +391,6 @@
         result.append(top)
         return result
 
-def _hlp2(i):
-    """return highest power of two lower than 'i'"""
-    return 2 ** int(math.log(i - 1, 2))
-
 @eh.reposetup
 def setupcache(ui, repo):