changeset 2198:ab392bd1c518

stablerange: move a utility function around It make more sense to have this small function earlier in the series
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 21:10:01 +0100
parents c4ece9c98dc4
children 7da7c8c9169d
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):