[PATCH 2 of 2 V2] dispatch: flush ui before returning from _runcatch

Yuya Nishihara yuya at tcha.org
Mon Mar 14 11:09:16 EDT 2016


On Mon, 14 Mar 2016 12:20:36 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1457953594 0
> #      Mon Mar 14 11:06:34 2016 +0000
> # Node ID 40b571e817902d930d1d828769d2d29bbba88de1
> # Parent  37c1410031153c71a46a467e6c94af16a7266d02
> dispatch: flush ui before returning from _runcatch
> 
> 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
> @@ -384,6 +384,7 @@
>          ui.warn(warning)
>          raise
>  
> +    ui.flush()
>      return -1

I guess this wouldn't catch the all cases. I'll recheck it tomorrow.


More information about the Mercurial-devel mailing list