changeset 36185:acc8e6e52af6

py3: use "%d" to convert integers to bytes Differential Revision: https://phab.mercurial-scm.org/D2263
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 14 Feb 2018 17:05:33 +0530
parents 56635c506608
children c1628a5eac87
files hgext/rebase.py hgext/shelve.py mercurial/verify.py
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Wed Feb 14 16:38:15 2018 +0530
+++ b/hgext/rebase.py	Wed Feb 14 17:05:33 2018 +0530
@@ -541,7 +541,7 @@
                                   'to commit\n') % (rev, ctx))
                         self.skipped.add(rev)
                     self.state[rev] = p1
-                    ui.debug('next revision set to %s\n' % p1)
+                    ui.debug('next revision set to %d\n' % p1)
             else:
                 ui.status(_('already rebased %s as %s\n') %
                           (desc, repo[self.state[rev]]))
--- a/hgext/shelve.py	Wed Feb 14 16:38:15 2018 +0530
+++ b/hgext/shelve.py	Wed Feb 14 17:05:33 2018 +0530
@@ -271,7 +271,7 @@
             "activebook": activebook or cls._noactivebook
         }
         scmutil.simplekeyvaluefile(repo.vfs, cls._filename)\
-               .write(info, firstline=str(cls._version))
+               .write(info, firstline=("%d" % cls._version))
 
     @classmethod
     def clear(cls, repo):
--- a/mercurial/verify.py	Wed Feb 14 16:38:15 2018 +0530
+++ b/mercurial/verify.py	Wed Feb 14 17:05:33 2018 +0530
@@ -60,6 +60,7 @@
     def err(self, linkrev, msg, filename=None):
         if linkrev is not None:
             self.badrevs.add(linkrev)
+            linkrev = "%d" % linkrev
         else:
             linkrev = '?'
         msg = "%s: %s" % (linkrev, msg)