equal
deleted
inserted
replaced
238 except fancyopts.getopt.GetoptError, inst: |
238 except fancyopts.getopt.GetoptError, inst: |
239 raise error.ParseError(None, inst) |
239 raise error.ParseError(None, inst) |
240 |
240 |
241 if args: |
241 if args: |
242 cmd, args = args[0], args[1:] |
242 cmd, args = args[0], args[1:] |
243 aliases, i = cmdutil.findcmd(cmd, commands.table, |
243 aliases, entry = cmdutil.findcmd(cmd, commands.table, |
244 ui.config("ui", "strict")) |
244 ui.config("ui", "strict")) |
245 cmd = aliases[0] |
245 cmd = aliases[0] |
246 args = aliasargs(i[0]) + args |
246 args = aliasargs(entry[0]) + args |
247 defaults = ui.config("defaults", cmd) |
247 defaults = ui.config("defaults", cmd) |
248 if defaults: |
248 if defaults: |
249 args = map(util.expandpath, shlex.split(defaults)) + args |
249 args = map(util.expandpath, shlex.split(defaults)) + args |
250 c = list(i[1]) |
250 c = list(entry[1]) |
251 else: |
251 else: |
252 cmd = None |
252 cmd = None |
253 c = [] |
253 c = [] |
254 |
254 |
255 # combine global options into local |
255 # combine global options into local |
265 for o in commands.globalopts: |
265 for o in commands.globalopts: |
266 n = o[1] |
266 n = o[1] |
267 options[n] = cmdoptions[n] |
267 options[n] = cmdoptions[n] |
268 del cmdoptions[n] |
268 del cmdoptions[n] |
269 |
269 |
270 return (cmd, cmd and i[0] or None, args, options, cmdoptions) |
270 return (cmd, cmd and entry[0] or None, args, options, cmdoptions) |
271 |
271 |
272 def _parseconfig(ui, config): |
272 def _parseconfig(ui, config): |
273 """parse the --config options from the command line""" |
273 """parse the --config options from the command line""" |
274 for cfg in config: |
274 for cfg in config: |
275 try: |
275 try: |