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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Feb 26 01:02:20 EST 2018


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

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



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


More information about the Mercurial-devel mailing list