Patchwork D2274: py3: stringify integer with %d instead of bytes()

login
register
mail settings
Submitter phabricator
Date Feb. 15, 2018, 2:04 a.m.
Message ID <b400725a0453d01d9bdea3f1ed65d23f@localhost.localdomain>
Download mbox | patch
Permalink /patch/27942/
State Not Applicable
Headers show

Comments

phabricator - Feb. 15, 2018, 2:04 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb67d4b7e8235: py3: stringify integer with %d instead of bytes() (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2274?vs=5729&id=5736

REVISION DETAIL
  https://phab.mercurial-scm.org/D2274

AFFECTED FILES
  mercurial/wireprotoserver.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -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):