# HG changeset patch # User Valentin Gatien-Baron # Date 1614265208 18000 # Node ID fa30292b680ba80e32bfd3e927a8fcbd553489d4 # Parent fe36ce0fbcdde0eb3ce019e26e5e61eb4729bc3a sshpeer: don't fail forwarding output from closed connections The test still shows an internal error, but one that happens further along. Differential Revision: https://phab.mercurial-scm.org/D10073 diff -r fe36ce0fbcdd -r fa30292b680b mercurial/sshpeer.py --- a/mercurial/sshpeer.py Thu Feb 25 09:59:23 2021 -0500 +++ b/mercurial/sshpeer.py Thu Feb 25 10:00:08 2021 -0500 @@ -40,7 +40,7 @@ """display all data currently available on pipe as remote output. This is non blocking.""" - if pipe: + if pipe and not pipe.closed: s = procutil.readpipe(pipe) if s: display = ui.warn if warn else ui.status diff -r fe36ce0fbcdd -r fa30292b680b tests/test-ssh-batch.t --- a/tests/test-ssh-batch.t Thu Feb 25 09:59:23 2021 -0500 +++ b/tests/test-ssh-batch.t Thu Feb 25 10:00:08 2021 -0500 @@ -10,4 +10,4 @@ further lookups don't result in tracebacks. $ hg pull -r b0 -r nosuchbookmark $(for i in $($TESTDIR/seq.py 1 20); do echo -r b$i; done) -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/$(pwd)/../a |& tail -n 1 - ValueError: I/O operation on closed file + StopIteration