changeset 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 7a46f0735904
children 3b3a987bbbaa
files mercurial/wireprotoserver.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py	Wed Feb 14 17:23:26 2018 -0700
+++ b/mercurial/wireprotoserver.py	Wed Feb 14 17:35:13 2018 -0700
@@ -445,7 +445,7 @@
                 _sshv1respondstream(self._fout, rsp)
             elif isinstance(rsp, wireprototypes.pushres):
                 _sshv1respondbytes(self._fout, b'')
-                _sshv1respondbytes(self._fout, bytes(rsp.res))
+                _sshv1respondbytes(self._fout, b'%d' % rsp.res)
             elif isinstance(rsp, wireprototypes.pusherr):
                 _sshv1respondbytes(self._fout, rsp.res)
             elif isinstance(rsp, wireprototypes.ooberror):