# HG changeset patch # User Jun Wu # Date 2016-04-04 00:10:51 # Node ID 73bfd9a54a5c2756e04592b5695bf89c30d6023a # Parent 7f7cd44cd6d5fe26a61d97a16e65e95563e81d2e chgserver: move args copying logic to the correct place A previous patch moved it to an incorrect place. Since dispatch._earlygetopt has side effects on args, we need to move it to the place before _earlygetopt. diff --git a/hgext/chgserver.py b/hgext/chgserver.py --- a/hgext/chgserver.py +++ b/hgext/chgserver.py @@ -279,6 +279,7 @@ def _loadnewui(srcui, args): srcui.config('extensions', 'chgserver'), '--config') # command line args + args = args[:] dispatch._parseconfig(newui, dispatch._earlygetopt(['--config'], args)) # stolen from tortoisehg.util.copydynamicconfig() @@ -293,7 +294,6 @@ def _loadnewui(srcui, args): newui.setconfig(section, name, value, source) # load wd and repo config, copied from dispatch.py - args = args[:] cwds = dispatch._earlygetopt(['--cwd'], args) cwd = cwds and os.path.realpath(cwds[-1]) or None rpath = dispatch._earlygetopt(["-R", "--repository", "--repo"], args)