Mercurial > public > mercurial-scm > hg
comparison mercurial/wireprotoserver.py @ 36213:b67d4b7e8235
py3: stringify integer with %d instead of bytes()
The unbundle wire protocol command now returns a properly formatted
reply in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2274
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 17:35:13 -0700 |
parents | a3d42d1865f1 |
children | 3b3a987bbbaa |
comparison
equal
deleted
inserted
replaced
36212:7a46f0735904 | 36213:b67d4b7e8235 |
---|---|
443 _sshv1respondstream(self._fout, rsp) | 443 _sshv1respondstream(self._fout, rsp) |
444 elif isinstance(rsp, wireprototypes.streamreslegacy): | 444 elif isinstance(rsp, wireprototypes.streamreslegacy): |
445 _sshv1respondstream(self._fout, rsp) | 445 _sshv1respondstream(self._fout, rsp) |
446 elif isinstance(rsp, wireprototypes.pushres): | 446 elif isinstance(rsp, wireprototypes.pushres): |
447 _sshv1respondbytes(self._fout, b'') | 447 _sshv1respondbytes(self._fout, b'') |
448 _sshv1respondbytes(self._fout, bytes(rsp.res)) | 448 _sshv1respondbytes(self._fout, b'%d' % rsp.res) |
449 elif isinstance(rsp, wireprototypes.pusherr): | 449 elif isinstance(rsp, wireprototypes.pusherr): |
450 _sshv1respondbytes(self._fout, rsp.res) | 450 _sshv1respondbytes(self._fout, rsp.res) |
451 elif isinstance(rsp, wireprototypes.ooberror): | 451 elif isinstance(rsp, wireprototypes.ooberror): |
452 _sshv1respondooberror(self._fout, self._ui.ferr, rsp.message) | 452 _sshv1respondooberror(self._fout, self._ui.ferr, rsp.message) |
453 else: | 453 else: |