Patchwork [5,of,8] py3: use '%d' to convert integers to bytes

login
register
mail settings
Submitter Pulkit Goyal
Date June 26, 2017, 7:55 p.m.
Message ID <c53fdc12a8c20510da85.1498506926@workspace>
Download mbox | patch
Permalink /patch/21746/
State Accepted
Headers show

Comments

Pulkit Goyal - June 26, 2017, 7:55 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1498477965 -19800
#      Mon Jun 26 17:22:45 2017 +0530
# Node ID c53fdc12a8c20510da85b080c47dbe7355791730
# Parent  7fa40e5656821b8ed20b31e62c37ad6245656d0d
py3: use '%d' to convert integers to bytes

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2712,7 +2712,7 @@ 
         if isbinary:
             count = 'Bin'
         else:
-            count = adds + removes
+            count = '%d' % (adds + removes)
         pluses = '+' * scale(adds)
         minuses = '-' * scale(removes)
         output.append(' %s%s |  %*s %s%s\n' %