[PATCH 8 of 8 py3] branchmap: be more careful about using %d on ints
Augie Fackler
raf at durin42.com
Sun Mar 19 02:11:39 EDT 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489899685 14400
# Sun Mar 19 01:01:25 2017 -0400
# Node ID 4ba8cf639ae4fb512d755e7eaa4286d5ee5c9513
# Parent 71e1dc3a007cb77ca1db3c6c8d73acf94b0be653
branchmap: be more careful about using %d on ints
Not doing so breaks Python 3.
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -426,7 +426,7 @@ class revbranchcache(object):
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 @@ class revbranchcache(object):
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
More information about the Mercurial-devel
mailing list