rcutil: directly call win32.executablepath()
authorYuya Nishihara <yuya@tcha.org>
Sat, 24 Mar 2018 13:30:50 +0900
changeset 37095 e24802ea8dbd
parent 37094 7f025c9b7865
child 37096 895f209b593b
rcutil: directly call win32.executablepath() Since it isn't supported on POSIX platform, we don't need to double the compatibility layers.
mercurial/posix.py
mercurial/scmwindows.py
mercurial/util.py
mercurial/windows.py
--- a/mercurial/posix.py	Sat Mar 24 17:19:32 2018 +0900
+++ b/mercurial/posix.py	Sat Mar 24 13:30:50 2018 +0900
@@ -626,9 +626,6 @@
     def __ne__(self, other):
         return not self == other
 
-def executablepath():
-    return None # available on Windows only
-
 def statislink(st):
     '''check whether a stat result is a symlink'''
     return st and stat.S_ISLNK(st.st_mode)
--- a/mercurial/scmwindows.py	Sat Mar 24 17:19:32 2018 +0900
+++ b/mercurial/scmwindows.py	Sat Mar 24 13:30:50 2018 +0900
@@ -21,7 +21,7 @@
 def systemrcpath():
     '''return default os-specific hgrc search path'''
     rcpath = []
-    filename = util.executablepath()
+    filename = win32.executablepath()
     # Use mercurial.ini found in directory with hg.exe
     progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini')
     rcpath.append(progrc)
--- a/mercurial/util.py	Sat Mar 24 17:19:32 2018 +0900
+++ b/mercurial/util.py	Sat Mar 24 13:30:50 2018 +0900
@@ -108,7 +108,6 @@
 checkexec = platform.checkexec
 checklink = platform.checklink
 copymode = platform.copymode
-executablepath = platform.executablepath
 expandglobs = platform.expandglobs
 explainexit = platform.explainexit
 findexe = platform.findexe
--- a/mercurial/windows.py	Sat Mar 24 17:19:32 2018 +0900
+++ b/mercurial/windows.py	Sat Mar 24 13:30:50 2018 +0900
@@ -31,7 +31,6 @@
 
 osutil = policy.importmod(r'osutil')
 
-executablepath = win32.executablepath
 getfsmountpoint = win32.getvolumename
 getfstype = win32.getfstype
 getuser = win32.getuser