branchmap: be more careful about using %d on ints
authorAugie Fackler <augie@google.com>
Sun, 19 Mar 2017 01:01:25 -0400
changeset 31497 a369482e9649
parent 31496 670166e0fcaa
child 31498 a248bbfa0bc7
branchmap: be more careful about using %d on ints Not doing so breaks Python 3.
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Sun Mar 19 00:16:39 2017 -0400
+++ b/mercurial/branchmap.py	Sun Mar 19 01:01:25 2017 -0400
@@ -426,7 +426,7 @@
         else:
             # rev/node map has changed, invalidate the cache from here up
             self._repo.ui.debug("history modification detected - truncating "
-                "revision branch cache to revision %s\n" % rev)
+                "revision branch cache to revision %d\n" % rev)
             truncate = rbcrevidx + _rbcrecsize
             del self._rbcrevs[truncate:]
             self._rbcrevslen = min(self._rbcrevslen, truncate)
@@ -503,7 +503,7 @@
                            len(self._rbcrevs) // _rbcrecsize)
                 f = repo.vfs.open(_rbcrevs, 'ab')
                 if f.tell() != start:
-                    repo.ui.debug("truncating %s to %s\n" % (_rbcrevs, start))
+                    repo.ui.debug("truncating %s to %d\n" % (_rbcrevs, start))
                     f.seek(start)
                     if f.tell() != start:
                         start = 0