##// END OF EJS Templates
blackbox: log the commands that are run...
Durham Goode -
r18670:ddc7268d default
parent child Browse files
Show More
@@ -247,6 +247,7 b' def _runcatch(req):'
247 247 (_("** Mercurial Distributed SCM (version %s)\n") % myver) +
248 248 (_("** Extensions loaded: %s\n") %
249 249 ", ".join([x[0] for x in extensions.extensions()])))
250 ui.log("commandexception", "%s\n%s\n", warning, traceback.format_exc())
250 251 ui.warn(warning)
251 252 raise
252 253
@@ -738,10 +739,16 b' def _dispatch(req):'
738 739 msg = ' '.join(' ' in a and repr(a) or a for a in fullargs)
739 740 ui.log("command", msg + "\n")
740 741 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
742 starttime = time.time()
743 ret = None
741 744 try:
742 return runcommand(lui, repo, cmd, fullargs, ui, options, d,
743 cmdpats, cmdoptions)
745 ret = runcommand(lui, repo, cmd, fullargs, ui, options, d,
746 cmdpats, cmdoptions)
747 return ret
744 748 finally:
749 duration = time.time() - starttime
750 ui.log("commandfinish", _("%s exited %s after %0.2f seconds\n"),
751 cmd, ret, duration)
745 752 if repo and repo != req.repo:
746 753 repo.close()
747 754
@@ -167,6 +167,7 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)
170 171 loop [=========> ] 2/8 1m07s\r (no-eol) (esc)
171 172 loop [===============> ] 3/8 56s\r (no-eol) (esc)
172 173 loop [=====================> ] 4/8 45s\r (no-eol) (esc)
@@ -203,6 +204,7 b' test delay time estimates'
203 204 Time estimates should not fail when there's no end point:
204 205 $ hg -y loop -- -4
205 206 \r (no-eol) (esc)
206 loop [ <=> ] 2\r (no-eol) (esc)
207 loop [ <=> ] 3\r (no-eol) (esc)
207 loop [ <=> ] 1\r (no-eol) (esc)
208 loop [ <=> ] 2\r (no-eol) (esc)
209 loop [ <=> ] 3\r (no-eol) (esc)
208 210 \r (no-eol) (esc)
General Comments 0
You need to be logged in to leave comments. Login now