[issue2442] stacktrace on invalid global option
Mads Kiilerich
bugs at mercurial.selenic.com
Sun Oct 17 16:55:57 UTC 2010
New submission from Mads Kiilerich <mads at kiilerich.com>:
We used to have
$ hg version -q
Mercurial Distributed SCM (version 1.6.3+385-975ec4ce961c)
$ hg --foo pull
hg: option --foo not recognized
Mercurial Distributed SCM
...
use "hg help" for the full list of commands or "hg -v" for details
[255]
but
$ hg version -q
Mercurial Distributed SCM (version 1.6.3+386-208fc9ad6a48)
$ hg --foo pull
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:16) [GCC 4.4.4 20100503
(Red Hat 4.4.4-2)]
** Mercurial Distributed SCM (version 1.6.3+386-208fc9ad6a48)
** Extensions loaded:
Traceback (most recent call last):
File "/home/mk/hg/hg", line 27, in <module>
mercurial.dispatch.run()
File "/home/mk/hg/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/mk/hg/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/home/mk/hg/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/home/mk/hg/mercurial/dispatch.py", line 470, in _dispatch
shellaliasfn = _checkshellalias(ui, args)
File "/home/mk/hg/mercurial/dispatch.py", line 438, in _checkshellalias
args = fancyopts.fancyopts(args, commands.globalopts, options)
File "/home/mk/hg/mercurial/fancyopts.py", line 99, in fancyopts
opts, args = parse(args, shortlist, namelist)
File "/usr/lib/python2.6/getopt.py", line 89, in getopt
opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
File "/usr/lib/python2.6/getopt.py", line 153, in do_longs
has_arg, opt = long_has_args(opt, longopts)
File "/usr/lib/python2.6/getopt.py", line 170, in long_has_args
raise GetoptError('option --%s not recognized' % opt, opt)
getopt.GetoptError: option --foo not recognized
[1]
introduced by
changeset: 12536:208fc9ad6a48
user: Steve Losh <steve at stevelosh.com>
date: Tue Aug 24 18:25:33 2010 -0400
summary: alias: only allow global options before a shell alias, pass
later ones through
----------
messages: 14068
nosy: kiilerix, sjl
priority: urgent
status: unread
title: stacktrace on invalid global option
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2442>
____________________________________________________
More information about the Mercurial-devel
mailing list