changeset 4562:80d35fba99a8

merge with main
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 12 Jun 2007 18:55:47 +0200
parents a73d80d6385a (diff) 9338be783398 (current diff)
children 8044be585b91
files
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jun 12 10:34:54 2007 -0500
+++ b/mercurial/commands.py	Tue Jun 12 18:55:47 2007 +0200
@@ -2997,11 +2997,13 @@
           " debugindex debugindexdot debugdate debuginstall")
 optionalrepo = ("paths serve showconfig")
 
-def run():
+def dispatch(args):
     try:
-        u = ui.ui(traceback='--traceback' in sys.argv[1:])
+        u = ui.ui(traceback='--traceback' in args)
     except util.Abort, inst:
         sys.stderr.write(_("abort: %s\n") % inst)
         return -1
-    sys.exit(cmdutil.runcatch(u, sys.argv[1:]))
-
+    return cmdutil.runcatch(u, args)
+
+def run():
+    sys.exit(dispatch(sys.argv[1:]))