[PATCH 6 of 8] ui: do not use rawinput() when we have to replace sys.stdin/stdout

Matt Harbison mharbison72 at gmail.com
Fri Mar 9 23:52:16 EST 2018


On Fri, 09 Mar 2018 07:35:39 -0500, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1520325533 21600
> #      Tue Mar 06 02:38:53 2018 -0600
> # Node ID ad7ff97565b261d82952acc9f941e5dd99f11374
> # Parent  63a13b91e1ab4d9fa0a713935be58794b9cadab5
> ui: do not use rawinput() when we have to replace sys.stdin/stdout

Windows really doesn't like this[1].  The simplest example out of that  
might be:

--- c:/Users/Matt/projects/hg/tests/test-merge-tools.t
+++ c:/Users/Matt/projects/hg/tests/test-merge-tools.t.err
@@ -556,6 +556,9 @@
    > u
    > EOF
    keep (l)ocal [working copy], take (o)ther [merge rev], or leave  
(u)nresolved for f? u
+
+  unrecognized response
+  keep (l)ocal [working copy], take (o)ther [merge rev], or leave  
(u)nresolved for f?
    0 files updated, 0 files merged, 0 files removed, 1 files unresolved
    use 'hg resolve' to retry unresolved file merges or 'hg merge --abort'  
to abandon
    [1]

(I bisected it back to this commit.  The fact that the testbot didn't pick  
up on it when first run is an example of changes not affecting the results  
until the subsequent run.)

[1]  
https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/542/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio


More information about the Mercurial-devel mailing list