[PATCH 1 of 7] util: mark platform-specific gethgcmd() as private

Yuya Nishihara yuya at tcha.org
Sun Mar 25 03:36:15 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1521878683 -32400
#      Sat Mar 24 17:04:43 2018 +0900
# Node ID 348e7462944f36f0fbea25bcf407c78d68aeaa1f
# Parent  704932ef8913f9a4d0aaeca0ef1bdb1bda0ad87e
util: mark platform-specific gethgcmd() as private

util.hgcmd() is the public interface for gethgcmd().

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -114,7 +114,7 @@ explainexit = platform.explainexit
 findexe = platform.findexe
 getfsmountpoint = platform.getfsmountpoint
 getfstype = platform.getfstype
-gethgcmd = platform.gethgcmd
+_gethgcmd = platform.gethgcmd
 getuser = platform.getuser
 getpid = os.getpid
 groupmembers = platform.groupmembers
@@ -2728,7 +2728,7 @@ def hgcmd():
             return [encoding.environ['EXECUTABLEPATH']]
         else:
             return [pycompat.sysexecutable]
-    return gethgcmd()
+    return _gethgcmd()
 
 def rundetached(args, condfn):
     """Execute the argument list in a detached process.


More information about the Mercurial-devel mailing list