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

login
register
mail settings
Submitter phabricator
Date Feb. 26, 2018, 6:02 a.m.
Message ID <differential-rev-PHID-DREV-zqkdlj2jyd37knpioybl-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28382/
State Superseded
Headers show

Comments

phabricator - Feb. 26, 2018, 6:02 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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):