[PATCH 1 of 7] util: move _hgexecutable a few lines, closer to where it is used

Mads Kiilerich mads at kiilerich.com
Sun Sep 28 15:02:58 UTC 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1411916226 -7200
#      Sun Sep 28 16:57:06 2014 +0200
# Node ID d064d89884c6ad9039d0b73086b337c1cabade0a
# Parent  4a502fab58617b3c84210fe053b7393b8d2247a5
util: move _hgexecutable a few lines, closer to where it is used

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -450,8 +450,6 @@ def pathto(root, n1, n2):
     b.reverse()
     return os.sep.join((['..'] * len(a)) + b) or '.'
 
-_hgexecutable = None
-
 def mainfrozen():
     """return True if we are a frozen executable.
 
@@ -462,6 +460,8 @@ def mainfrozen():
             safehasattr(sys, "importers") or # old py2exe
             imp.is_frozen("__main__")) # tools/freeze
 
+_hgexecutable = None
+
 def hgexecutable():
     """return location of the 'hg' executable.
 


More information about the Mercurial-devel mailing list