[PATCH 8 of 8 py3] server: use pycompat to get argv
Augie Fackler
raf at durin42.com
Sun May 28 16:59:04 EDT 2017
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1496000606 14400
# Sun May 28 15:43:26 2017 -0400
# Node ID 81566b002a908e3c68f1a689a334b2b28715aaa0
# Parent 99ca209bad39793fa60f226ffe35a88ef7b0d004
server: use pycompat to get argv
diff --git a/mercurial/server.py b/mercurial/server.py
--- a/mercurial/server.py
+++ b/mercurial/server.py
@@ -8,7 +8,6 @@
from __future__ import absolute_import
import os
-import sys
import tempfile
from .i18n import _
@@ -19,6 +18,7 @@ from . import (
commandserver,
error,
hgweb,
+ pycompat,
util,
)
@@ -42,7 +42,7 @@ def runservice(opts, parentfn=None, init
os.close(lockfd)
try:
if not runargs:
- runargs = util.hgcmd() + sys.argv[1:]
+ runargs = util.hgcmd() + pycompat.sysargv[1:]
runargs.append('--daemon-postexec=unlink:%s' % lockpath)
# Don't pass --cwd to the child process, because we've already
# changed directory.
More information about the Mercurial-devel
mailing list