Show More
@@ -62,7 +62,16 b' def dispatch(req):' | |||
|
62 | 62 | ferr.write(_("hg: parse error: %s\n") % inst.args[0]) |
|
63 | 63 | return -1 |
|
64 | 64 | |
|
65 | return _runcatch(req) | |
|
65 | msg = ' '.join(' ' in a and repr(a) or a for a in req.args) | |
|
66 | starttime = time.time() | |
|
67 | ret = None | |
|
68 | try: | |
|
69 | ret = _runcatch(req) | |
|
70 | return ret | |
|
71 | finally: | |
|
72 | duration = time.time() - starttime | |
|
73 | req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", | |
|
74 | msg, ret or 0, duration) | |
|
66 | 75 | |
|
67 | 76 | def _runcatch(req): |
|
68 | 77 | def catchterm(*args): |
@@ -764,16 +773,10 b' def _dispatch(req):' | |||
|
764 | 773 | msg = ' '.join(' ' in a and repr(a) or a for a in fullargs) |
|
765 | 774 | ui.log("command", '%s\n', msg) |
|
766 | 775 | d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) |
|
767 | starttime = time.time() | |
|
768 | ret = None | |
|
769 | 776 | try: |
|
770 |
ret |
|
|
771 | cmdpats, cmdoptions) | |
|
772 | return ret | |
|
777 | return runcommand(lui, repo, cmd, fullargs, ui, options, d, | |
|
778 | cmdpats, cmdoptions) | |
|
773 | 779 | finally: |
|
774 | duration = time.time() - starttime | |
|
775 | ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", | |
|
776 | cmd, ret, duration) | |
|
777 | 780 | if repo and repo != req.repo: |
|
778 | 781 | repo.close() |
|
779 | 782 |
@@ -26,7 +26,7 b' command, exit codes, and duration' | |||
|
26 | 26 | $ hg add a |
|
27 | 27 | $ hg blackbox |
|
28 | 28 | 1970/01/01 00:00:00 bob> add a |
|
29 | 1970/01/01 00:00:00 bob> add exited 0 after * seconds (glob) | |
|
29 | 1970/01/01 00:00:00 bob> add a exited 0 after * seconds (glob) | |
|
30 | 30 | |
|
31 | 31 | incoming change tracking |
|
32 | 32 | |
@@ -58,7 +58,7 b' clone, commit, pull' | |||
|
58 | 58 | $ hg blackbox -l 3 |
|
59 | 59 | 1970/01/01 00:00:00 bob> pull |
|
60 | 60 | 1970/01/01 00:00:00 bob> 1 incoming changes - new heads: d02f48003e62 |
|
61 |
1970/01/01 00:00:00 bob> pull exited |
|
|
61 | 1970/01/01 00:00:00 bob> pull exited 0 after * seconds (glob) | |
|
62 | 62 | |
|
63 | 63 | we must not cause a failure if we cannot write to the log |
|
64 | 64 | |
@@ -118,7 +118,7 b' backup bundles get logged' | |||
|
118 | 118 | $ hg blackbox -l 3 |
|
119 | 119 | 1970/01/01 00:00:00 bob> strip tip |
|
120 | 120 | 1970/01/01 00:00:00 bob> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob) |
|
121 | 1970/01/01 00:00:00 bob> strip exited 0 after * seconds (glob) | |
|
121 | 1970/01/01 00:00:00 bob> strip tip exited 0 after * seconds (glob) | |
|
122 | 122 | |
|
123 | 123 | extension and python hooks - use the eol extension for a pythonhook |
|
124 | 124 | |
@@ -133,7 +133,7 b' extension and python hooks - use the eol' | |||
|
133 | 133 | 1970/01/01 00:00:00 bob> update |
|
134 | 134 | 1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) |
|
135 | 135 | 1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob) |
|
136 |
1970/01/01 00:00:00 bob> update exited |
|
|
136 | 1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob) | |
|
137 | 137 | |
|
138 | 138 | log rotation |
|
139 | 139 |
@@ -167,7 +167,6 b' test delay time estimates' | |||
|
167 | 167 | |
|
168 | 168 | $ hg -y loop 8 |
|
169 | 169 | \r (no-eol) (esc) |
|
170 | loop [====> ] 1/8 1m18s\r (no-eol) (esc) | |
|
171 | 170 | loop [=========> ] 2/8 1m07s\r (no-eol) (esc) |
|
172 | 171 | loop [===============> ] 3/8 56s\r (no-eol) (esc) |
|
173 | 172 | loop [=====================> ] 4/8 45s\r (no-eol) (esc) |
@@ -204,7 +203,6 b' test delay time estimates' | |||
|
204 | 203 | Time estimates should not fail when there's no end point: |
|
205 | 204 | $ hg -y loop -- -4 |
|
206 | 205 | \r (no-eol) (esc) |
|
207 |
loop [ <=> ] |
|
|
208 |
loop [ <=> ] |
|
|
209 | loop [ <=> ] 3\r (no-eol) (esc) | |
|
206 | loop [ <=> ] 2\r (no-eol) (esc) | |
|
207 | loop [ <=> ] 3\r (no-eol) (esc) | |
|
210 | 208 | \r (no-eol) (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now