comparison mercurial/cmdutil.py @ 4734:9ac493f12901

Abort if earlygetopt fails to detect an option. Otherwise it could happen that a command is used on the wrong repository, because abbreviations of --cwd or --repository were ignored.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 28 Jun 2007 16:03:45 +0200
parents 0ecfc3b3f072
children f3f84d5cd268
comparison
equal deleted inserted replaced
4733:0ecfc3b3f072 4734:9ac493f12901
316 util._fallbackencoding = fallback 316 util._fallbackencoding = fallback
317 317
318 fullargs = args 318 fullargs = args
319 cmd, func, args, options, cmdoptions = parse(ui, args) 319 cmd, func, args, options, cmdoptions = parse(ui, args)
320 320
321 if options["config"]:
322 raise util.Abort(_("Option --config may not be abbreviated!"))
323 if options["cwd"]:
324 raise util.Abort(_("Option --cwd may not be abbreviated!"))
325 if options["repository"]:
326 raise util.Abort(_(
327 "Option -R has to be separated from other options (i.e. not -qR) "
328 "and --repository may only be abbreviated as --repo!"))
329
321 if options["encoding"]: 330 if options["encoding"]:
322 util._encoding = options["encoding"] 331 util._encoding = options["encoding"]
323 if options["encodingmode"]: 332 if options["encodingmode"]:
324 util._encodingmode = options["encodingmode"] 333 util._encodingmode = options["encodingmode"]
325 if options["time"]: 334 if options["time"]: