[PATCH 3 of 7] py3: use '%d' instead of '%s' for integers

Pulkit Goyal 7895pulkit at gmail.com
Sat Jun 17 08:45:21 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1497691405 -19800
#      Sat Jun 17 14:53:25 2017 +0530
# Node ID 8672832a62a28fec052f23120e6b801da5cb7081
# Parent  24ed9e4abb5584a94614e1e7506c69b2ebced69b
py3: use '%d' instead of '%s' for integers

Python 3 does not let you use '%s' for integers.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1174,11 +1174,11 @@
             oldtip = oldlen - 1
 
             if detail and ui.verbose:
-                msg = (_('repository tip rolled back to revision %s'
+                msg = (_('repository tip rolled back to revision %d'
                          ' (undo %s: %s)\n')
                        % (oldtip, desc, detail))
             else:
-                msg = (_('repository tip rolled back to revision %s'
+                msg = (_('repository tip rolled back to revision %d'
                          ' (undo %s)\n')
                        % (oldtip, desc))
         except IOError:


More information about the Mercurial-devel mailing list