# HG changeset patch # User Jun Wu # Date 2016-03-14 11:06:34 # Node ID 293adbaa14a76e324397517deb7e65f38138ace5 # Parent dfd5a6830ea7cd56909b6667c78ae122cc3a5aa1 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. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -129,6 +129,7 @@ def dispatch(req): ret = -1 finally: duration = time.time() - starttime + req.ui.flush() req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n", msg, ret or 0, duration) return ret