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

login
register
mail settings
Submitter Yuya Nishihara
Date March 25, 2018, 3:36 a.m.
Message ID <348e7462944f36f0fbea.1521948975@mimosa>
Download mbox | patch
Permalink /patch/29831/
State Accepted
Headers show

Comments

Yuya Nishihara - March 25, 2018, 3:36 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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().
Pulkit Goyal - March 25, 2018, 9:38 a.m.
On Sun, Mar 25, 2018 at 9:06 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@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().

Queued the series. Many thanks!

Patch

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.