Mercurial > hg-stable
comparison contrib/hg-ssh @ 37988:dc1ed7fe33e4
sshserver: do setbinary() by caller (API)
In most cases, stdio should be set to binary mode by the dispatcher, so
the sshserver does not have to take care of that. The only exception was
hg-ssh, which is fixed by this patch.
.. api::
``sshserver()`` no longer sets stdin and stdout to binary mode.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Mar 2018 16:35:24 +0900 |
parents | 42bc7f39376b |
children | 44ef9bb7ccd9 |
comparison
equal
deleted
inserted
replaced
37987:45a669bad421 | 37988:dc1ed7fe33e4 |
---|---|
41 dispatch, | 41 dispatch, |
42 ui as uimod, | 42 ui as uimod, |
43 ) | 43 ) |
44 | 44 |
45 def main(): | 45 def main(): |
46 # Prevent insertion/deletion of CRs | |
47 dispatch.initstdio() | |
48 | |
46 cwd = os.getcwd() | 49 cwd = os.getcwd() |
47 readonly = False | 50 readonly = False |
48 args = sys.argv[1:] | 51 args = sys.argv[1:] |
49 while len(args): | 52 while len(args): |
50 if args[0] == '--read-only': | 53 if args[0] == '--read-only': |