##// END OF EJS Templates
Revive commands.dispatch as a simple way to call hg from other pythons scripts....
Thomas Arendsen Hein -
r4561:a73d80d6 default
parent child Browse files
Show More
@@ -2997,11 +2997,13 b' norepo = ("clone init version help debug'
2997 " debugindex debugindexdot debugdate debuginstall")
2997 " debugindex debugindexdot debugdate debuginstall")
2998 optionalrepo = ("paths serve showconfig")
2998 optionalrepo = ("paths serve showconfig")
2999
2999
3000 def run():
3000 def dispatch(args):
3001 try:
3001 try:
3002 u = ui.ui(traceback='--traceback' in sys.argv[1:])
3002 u = ui.ui(traceback='--traceback' in args)
3003 except util.Abort, inst:
3003 except util.Abort, inst:
3004 sys.stderr.write(_("abort: %s\n") % inst)
3004 sys.stderr.write(_("abort: %s\n") % inst)
3005 return -1
3005 return -1
3006 sys.exit(cmdutil.runcatch(u, sys.argv[1:]))
3006 return cmdutil.runcatch(u, args)
3007
3007
3008 def run():
3009 sys.exit(dispatch(sys.argv[1:]))
General Comments 0
You need to be logged in to leave comments. Login now