[PATCH 3 of 3] test-sshserver: stabilize for Windows

Yuya Nishihara yuya at tcha.org
Sat Jan 20 21:42:47 EST 2018


On Sat, 20 Jan 2018 15:14:25 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1516476100 18000
> #      Sat Jan 20 14:21:40 2018 -0500
> # Node ID 1dd5724664ab53e0cf2a69809bb3f4158d4e30d7
> # Parent  ebb75443969ae8b4c750b7f082387bb126e2978f
> test-sshserver: stabilize for Windows

Queued, thanks.

>  from mercurial import (
>      sshserver,
> +    util,
>      wireproto,
>  )
>  
> @@ -41,4 +42,6 @@
>          self.ferr = io.BytesIO()
>  
>  if __name__ == '__main__':
> +    # Don't call into msvcrt to set BytesIO to binary mode
> +    util.setbinary = lambda fp: True

Perhaps windows.setbinary() should catch IOError raised by io.BytesIO.fileno(),
but that isn't important now.


More information about the Mercurial-devel mailing list