Patchwork D2449: wireproto: use %d to encode an int, not a %s

login
register
mail settings
Submitter phabricator
Date Feb. 26, 2018, 1:12 p.m.
Message ID <65c4b7e0979fa4f80ed06f5ae5385b3b@localhost.localdomain>
Download mbox | patch
Permalink /patch/28397/
State Not Applicable
Headers show

Comments

phabricator - Feb. 26, 2018, 1:12 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGec43960b03e8: wireproto: use %d to encode an int, not a %s (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2449?vs=6104&id=6119

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

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -955,7 +955,7 @@ 
                          encoding.tolocal(old), new) or False
 
     output = output.getvalue() if output else ''
-    return bytesresponse('%s\n%s' % (int(r), output))
+    return bytesresponse('%d\n%s' % (int(r), output))
 
 @wireprotocommand('stream_out')
 def stream(repo, proto):