Show More
@@ -126,7 +126,8 b' def reposetup(ui, repo):' | |||
|
126 | 126 | if not repo.local(): |
|
127 | 127 | return |
|
128 | 128 | |
|
129 | ui.setrepo(repo) | |
|
129 | if util.safehasattr(ui, 'setrepo'): | |
|
130 | ui.setrepo(repo) | |
|
130 | 131 | |
|
131 | 132 | @command('^blackbox', |
|
132 | 133 | [('l', 'limit', 10, _('the number of events to show')), |
@@ -1325,6 +1325,8 b' def commit(ui, repo, *pats, **opts):' | |||
|
1325 | 1325 | Returns 0 on success, 1 if nothing changed. |
|
1326 | 1326 | """ |
|
1327 | 1327 | if opts.get('subrepos'): |
|
1328 | if opts.get('amend'): | |
|
1329 | raise util.Abort(_('cannot amend with --subrepos')) | |
|
1328 | 1330 | # Let --subrepos on the command line override config setting. |
|
1329 | 1331 | ui.setconfig('ui', 'commitsubrepos', True) |
|
1330 | 1332 | |
@@ -1337,7 +1339,7 b' def commit(ui, repo, *pats, **opts):' | |||
|
1337 | 1339 | |
|
1338 | 1340 | if opts.get('amend'): |
|
1339 | 1341 | if ui.configbool('ui', 'commitsubrepos'): |
|
1340 |
raise util.Abort(_('cannot amend |
|
|
1342 | raise util.Abort(_('cannot amend with ui.commitsubrepos enabled')) | |
|
1341 | 1343 | |
|
1342 | 1344 | old = repo['.'] |
|
1343 | 1345 | if old.phase() == phases.public: |
@@ -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