Show More
@@ -2860,6 +2860,7 b' def dispatch(args):' | |||
|
2860 | 2860 | else: |
|
2861 | 2861 | d = lambda: func(u, *args, **cmdoptions) |
|
2862 | 2862 | |
|
2863 | try: | |
|
2863 | 2864 | if options['profile']: |
|
2864 | 2865 | import hotshot, hotshot.stats |
|
2865 | 2866 | prof = hotshot.Profile("hg.prof") |
@@ -2868,8 +2869,8 b' def dispatch(args):' | |||
|
2868 | 2869 | return prof.runcall(d) |
|
2869 | 2870 | except: |
|
2870 | 2871 | try: |
|
2871 |
u.warn(_('exception raised - generating |
|
|
2872 | 'anyway\n')) | |
|
2872 | u.warn(_('exception raised - generating ' | |
|
2873 | 'profile anyway\n')) | |
|
2873 | 2874 | except: |
|
2874 | 2875 | pass |
|
2875 | 2876 | raise |
@@ -2881,6 +2882,8 b' def dispatch(args):' | |||
|
2881 | 2882 | stats.print_stats(40) |
|
2882 | 2883 | else: |
|
2883 | 2884 | return d() |
|
2885 | finally: | |
|
2886 | u.flush() | |
|
2884 | 2887 | except: |
|
2885 | 2888 | # enter the debugger when we hit an exception |
|
2886 | 2889 | if options['debugger']: |
@@ -132,6 +132,12 b' class ui(object):' | |||
|
132 | 132 | for a in args: |
|
133 | 133 | sys.stderr.write(str(a)) |
|
134 | 134 | |
|
135 | def flush(self): | |
|
136 | try: | |
|
137 | sys.stdout.flush() | |
|
138 | finally: | |
|
139 | sys.stderr.flush() | |
|
140 | ||
|
135 | 141 | def readline(self): |
|
136 | 142 | return sys.stdin.readline()[:-1] |
|
137 | 143 | def prompt(self, msg, pat, default="y"): |
General Comments 0
You need to be logged in to leave comments.
Login now