Patchwork [02,of,11,py3] debuginstall: use %d instead of %s for formatting an int

login
register
mail settings
Submitter Augie Fackler
Date Oct. 9, 2016, 2:16 p.m.
Message ID <826ebebef37bd58fea9a.1476022604@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/16998/
State Accepted
Headers show

Comments

Augie Fackler - Oct. 9, 2016, 2:16 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1476020566 14400
#      Sun Oct 09 09:42:46 2016 -0400
# Node ID 826ebebef37bd58fea9abdd4690ea7b5ad6b7552
# Parent  9b6ff0f940ed2ee33516aac22d5c69914400af7a
debuginstall: use %d instead of %s for formatting an int

% formatting on bytes on Python 3 is pickier about which % character
we specify.
Yuya Nishihara - Oct. 10, 2016, 7:53 p.m.
On Sun, 09 Oct 2016 10:16:44 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1476020566 14400
> #      Sun Oct 09 09:42:46 2016 -0400
> # Node ID 826ebebef37bd58fea9abdd4690ea7b5ad6b7552
> # Parent  9b6ff0f940ed2ee33516aac22d5c69914400af7a
> debuginstall: use %d instead of %s for formatting an int

Queued this, thanks.

(Some of the other patches could be cherry-picked, but I don't have enough
time to sort out good ones, so took only this.)

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2798,7 +2798,7 @@  def debuginstall(ui, **opts):
     if not problems:
         fm.data(problems=problems)
     fm.condwrite(problems, 'problems',
-                 _("%s problems detected,"
+                 _("%d problems detected,"
                    " please check your install!\n"), problems)
     fm.end()