diff mercurial/chgserver.py @ 35233:6e6d0a5b88e6

dispatch: replace _earlyreq*() with new fancyopts-based parser
author Yuya Nishihara <yuya@tcha.org>
date Thu, 23 Nov 2017 22:23:59 +0900
parents c9740b69b9b7
children 72b91f905065
line wrap: on
line diff
--- a/mercurial/chgserver.py	Sat Nov 25 17:03:52 2017 +0900
+++ b/mercurial/chgserver.py	Thu Nov 23 22:23:59 2017 +0900
@@ -220,16 +220,7 @@
         newui._csystem = srcui._csystem
 
     # command line args
-    options = {}
-    if srcui.plain('strictflags'):
-        options.update(dispatch._earlyparseopts(args))
-    else:
-        args = args[:]
-        options['config'] = dispatch._earlygetopt(['--config'], args)
-        cwds = dispatch._earlygetopt(['--cwd'], args)
-        options['cwd'] = cwds and cwds[-1] or ''
-        rpath = dispatch._earlygetopt(["-R", "--repository", "--repo"], args)
-        options['repository'] = rpath and rpath[-1] or ''
+    options = dispatch._earlyparseopts(newui, args)
     dispatch._parseconfig(newui, options['config'])
 
     # stolen from tortoisehg.util.copydynamicconfig()