windows: make sure we fully read and cleanly close the connection
Maybe this will prevent server on Windows to sometimes complains about the
client closing the connection too soon. So we make sure we read everything and
we officially close the connection.
Hopefully Windows will be happier and the test will stop being flaky.
Differential Revision: https://phab.mercurial-scm.org/D11073
#require black test-repo
Black needs the real USERPROFILE in order to run on Windows
#if msys
$ USERPROFILE="$REALUSERPROFILE"
$ export USERPROFILE
#endif
$ cd $RUNTESTDIR/..
$ black --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`