Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
35232:4edd2202f7d7 | 35233:6e6d0a5b88e6 |
---|---|
218 setattr(newui, a, getattr(srcui, a)) | 218 setattr(newui, a, getattr(srcui, a)) |
219 if util.safehasattr(srcui, '_csystem'): | 219 if util.safehasattr(srcui, '_csystem'): |
220 newui._csystem = srcui._csystem | 220 newui._csystem = srcui._csystem |
221 | 221 |
222 # command line args | 222 # command line args |
223 options = {} | 223 options = dispatch._earlyparseopts(newui, args) |
224 if srcui.plain('strictflags'): | |
225 options.update(dispatch._earlyparseopts(args)) | |
226 else: | |
227 args = args[:] | |
228 options['config'] = dispatch._earlygetopt(['--config'], args) | |
229 cwds = dispatch._earlygetopt(['--cwd'], args) | |
230 options['cwd'] = cwds and cwds[-1] or '' | |
231 rpath = dispatch._earlygetopt(["-R", "--repository", "--repo"], args) | |
232 options['repository'] = rpath and rpath[-1] or '' | |
233 dispatch._parseconfig(newui, options['config']) | 224 dispatch._parseconfig(newui, options['config']) |
234 | 225 |
235 # stolen from tortoisehg.util.copydynamicconfig() | 226 # stolen from tortoisehg.util.copydynamicconfig() |
236 for section, name, value in srcui.walkconfig(): | 227 for section, name, value in srcui.walkconfig(): |
237 source = srcui.configsource(section, name) | 228 source = srcui.configsource(section, name) |