comparison mercurial/wireprotoserver.py @ 42896:7e19b640c53e

sshserver: flush stream after command dispatch I am not sure why this is not working as expected, but without this client might not see some important output. Without this patch moving some output at transaction closing time makes it disapear for ssh client in various sitaution.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 08 Sep 2019 01:02:34 +0200
parents 2c4f656c8e9f
children 2372284d9457
comparison
equal deleted inserted replaced
42895:bbcaf3a74822 42896:7e19b640c53e
655 if not available: 655 if not available:
656 _sshv1respondbytes(fout, b'') 656 _sshv1respondbytes(fout, b'')
657 continue 657 continue
658 658
659 rsp = wireprotov1server.dispatch(repo, proto, request) 659 rsp = wireprotov1server.dispatch(repo, proto, request)
660 repo.ui.fout.flush()
661 repo.ui.ferr.flush()
660 662
661 if isinstance(rsp, bytes): 663 if isinstance(rsp, bytes):
662 _sshv1respondbytes(fout, rsp) 664 _sshv1respondbytes(fout, rsp)
663 elif isinstance(rsp, wireprototypes.bytesresponse): 665 elif isinstance(rsp, wireprototypes.bytesresponse):
664 _sshv1respondbytes(fout, rsp.data) 666 _sshv1respondbytes(fout, rsp.data)