Patchwork [2,of,2] changegroup: flush the ui stdio buffers after adding a changegroup

login
register
mail settings
Submitter Matt Harbison
Date April 11, 2015, 5:57 a.m.
Message ID <649e6c462b6b1f2aef6d.1428731847@Envy>
Download mbox | patch
Permalink /patch/8608/
State Accepted
Commit 76326459bdfa078a11c78f74879e906877f66234
Headers show

Comments

Matt Harbison - April 11, 2015, 5:57 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1428723246 14400
#      Fri Apr 10 23:34:06 2015 -0400
# Node ID 649e6c462b6b1f2aef6dbd2a6f5c47ea85381ed9
# Parent  ff700da553f4003835d45204b76be2a05e98b78c
changegroup: flush the ui stdio buffers after adding a changegroup

This eliminates the following test failure on Windows, as well as a similar one
in evolve's test-wireproto.t.  See the previous patch for details on the
problem.

  --- e:/Projects/hg/tests/test-init.t
  +++ e:/Projects/hg/tests/test-init.t.err
  @@ -216,10 +216,10 @@
      * test                      0:08b9e9f63b32
     $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
     searching for changes
  +  exporting bookmark test
     remote: adding changesets
     remote: adding manifests
     remote: adding file changes
     remote: added 1 changesets with 1 changes to 1 files
  -  exporting bookmark test
     $ hg -R remote-bookmarks bookmarks
        test                      0:08b9e9f63b32
Augie Fackler - April 11, 2015, 9:28 p.m.
On Sat, Apr 11, 2015 at 01:57:27AM -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1428723246 14400
> #      Fri Apr 10 23:34:06 2015 -0400
> # Node ID 649e6c462b6b1f2aef6dbd2a6f5c47ea85381ed9
> # Parent  ff700da553f4003835d45204b76be2a05e98b78c
> changegroup: flush the ui stdio buffers after adding a changegroup
>

queued these, thanks

>
> This eliminates the following test failure on Windows, as well as a similar one
> in evolve's test-wireproto.t.  See the previous patch for details on the
> problem.
>
>   --- e:/Projects/hg/tests/test-init.t
>   +++ e:/Projects/hg/tests/test-init.t.err
>   @@ -216,10 +216,10 @@
>       * test                      0:08b9e9f63b32
>      $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
>      searching for changes
>   +  exporting bookmark test
>      remote: adding changesets
>      remote: adding manifests
>      remote: adding file changes
>      remote: added 1 changesets with 1 changes to 1 files
>   -  exporting bookmark test
>      $ hg -R remote-bookmarks bookmarks
>         test                      0:08b9e9f63b32
>
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -891,6 +891,7 @@
>
>      finally:
>          tr.release()
> +        repo.ui.flush()
>      # never return 0 here:
>      if dh < 0:
>          return dh - 1
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -891,6 +891,7 @@ 
 
     finally:
         tr.release()
+        repo.ui.flush()
     # never return 0 here:
     if dh < 0:
         return dh - 1