Mercurial > public > mercurial-scm > hg
comparison mercurial/wireprotoserver.py @ 37944: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 | 856f381ad74b |
children | bfe8ef6e370e |
comparison
equal
deleted
inserted
replaced
37943:45a669bad421 | 37944:dc1ed7fe33e4 |
---|---|
796 logfh, ui.ferr, 'e', logdata=True) | 796 logfh, ui.ferr, 'e', logdata=True) |
797 | 797 |
798 hook.redirect(True) | 798 hook.redirect(True) |
799 ui.fout = repo.ui.fout = ui.ferr | 799 ui.fout = repo.ui.fout = ui.ferr |
800 | 800 |
801 # Prevent insertion/deletion of CRs | |
802 procutil.setbinary(self._fin) | |
803 procutil.setbinary(self._fout) | |
804 | |
805 def serve_forever(self): | 801 def serve_forever(self): |
806 self.serveuntil(threading.Event()) | 802 self.serveuntil(threading.Event()) |
807 sys.exit(0) | 803 sys.exit(0) |
808 | 804 |
809 def serveuntil(self, ev): | 805 def serveuntil(self, ev): |