# HG changeset patch # User Pierre-Yves David # Date 1490213401 -3600 # Node ID ab392bd1c518ae7cecd0a3ece37a8292b79bb1fc # Parent c4ece9c98dc4e4825ac7f5148bdb66046c9a75a1 stablerange: move a utility function around It make more sense to have this small function earlier in the series diff --git a/hgext3rd/evolve/stablerange.py b/hgext3rd/evolve/stablerange.py --- a/hgext3rd/evolve/stablerange.py +++ b/hgext3rd/evolve/stablerange.py @@ -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):