##// END OF EJS Templates
[PATCH] Add --traceback option...
mpm@selenic.com -
r527:58790c83 default
parent child Browse files
Show More
@@ -818,6 +818,7 b' def dispatch(args):'
818 ('q', 'quiet', None, 'quiet'),
818 ('q', 'quiet', None, 'quiet'),
819 ('p', 'profile', None, 'profile'),
819 ('p', 'profile', None, 'profile'),
820 ('R', 'repository', "", 'repository root directory'),
820 ('R', 'repository', "", 'repository root directory'),
821 ('', 'traceback', None, 'print traceback on exception'),
821 ('y', 'noninteractive', None, 'run non-interactively'),
822 ('y', 'noninteractive', None, 'run non-interactively'),
822 ('', 'version', None, 'output version information and exit'),
823 ('', 'version', None, 'output version information and exit'),
823 ]
824 ]
@@ -855,6 +856,7 b' def dispatch(args):'
855 sys.exit(-1)
856 sys.exit(-1)
856
857
857 try:
858 try:
859 try:
858 if cmd not in norepo.split():
860 if cmd not in norepo.split():
859 path = options["repository"] or ""
861 path = options["repository"] or ""
860 repo = hg.repository(ui=u, path=path)
862 repo = hg.repository(ui=u, path=path)
@@ -874,6 +876,10 b' def dispatch(args):'
874 return r
876 return r
875 else:
877 else:
876 return d()
878 return d()
879 except:
880 if options['traceback']:
881 traceback.print_exc()
882 raise
877 except util.CommandError, inst:
883 except util.CommandError, inst:
878 u.warn("abort: %s\n" % inst.args)
884 u.warn("abort: %s\n" % inst.args)
879 except hg.RepoError, inst:
885 except hg.RepoError, inst:
General Comments 0
You need to be logged in to leave comments. Login now