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

Pulkit Goyal 7895pulkit at gmail.com
Mon Jun 26 15:55:26 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at 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

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' %


More information about the Mercurial-devel mailing list