Mercurial > hg
comparison mercurial/dispatch.py @ 28534:293adbaa14a7
dispatch: flush ui before returning from dispatch
A chg client may exit after received the result from runcommand. It is
necessary to do a flush to make sure the warning message is printed out
and the process waiting for the chg client will actually see the output.
This helps chg to pass test-alias.t.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 14 Mar 2016 11:06:34 +0000 |
parents | 84cc72c5771e |
children | 009f58f1ea75 |
comparison
equal
deleted
inserted
replaced
28533:dfd5a6830ea7 | 28534:293adbaa14a7 |
---|---|
127 if inst.errno != errno.EPIPE: | 127 if inst.errno != errno.EPIPE: |
128 raise | 128 raise |
129 ret = -1 | 129 ret = -1 |
130 finally: | 130 finally: |
131 duration = time.time() - starttime | 131 duration = time.time() - starttime |
132 req.ui.flush() | |
132 req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", | 133 req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", |
133 msg, ret or 0, duration) | 134 msg, ret or 0, duration) |
134 return ret | 135 return ret |
135 | 136 |
136 def _runcatch(req): | 137 def _runcatch(req): |