Patchwork [8,of,8,py3] server: use pycompat to get argv

login
register
mail settings
Submitter Augie Fackler
Date May 28, 2017, 8:59 p.m.
Message ID <81566b002a908e3c68f1.1496005144@imladris.local>
Download mbox | patch
Permalink /patch/21006/
State Accepted
Headers show

Comments

Augie Fackler - May 28, 2017, 8:59 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1496000606 14400
#      Sun May 28 15:43:26 2017 -0400
# Node ID 81566b002a908e3c68f1a689a334b2b28715aaa0
# Parent  99ca209bad39793fa60f226ffe35a88ef7b0d004
server: use pycompat to get argv

Patch

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.