diff -r 34706a835d4a -r 8b4435aae40a mercurial/commands.py --- a/mercurial/commands.py Wed Sep 07 23:38:28 2005 -0700 +++ b/mercurial/commands.py Wed Sep 07 23:57:59 2005 -0700 @@ -2003,5 +2003,12 @@ except UnknownCommand, inst: u.warn("hg: unknown command '%s'\n" % inst.args[0]) help_(u, 'shortlist') + except SystemExit: + # don't catch this is the catch-all below + raise + except: + u.warn("** unknown exception encountered, details follow\n") + u.warn("** report bug details to mercurial@selenic.com\n") + raise sys.exit(-1)