[PATCH 8 of 9 py3 v3] branchmap: stringify int in a portable way
Augie Fackler
raf at durin42.com
Sun Mar 12 13:59:16 EDT 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489297366 18000
# Sun Mar 12 00:42:46 2017 -0500
# Node ID fb7154195406381920737671ff2402d910bb5546
# Parent 46eb1834c644e675bd246bbae254cada40c2f21b
branchmap: stringify int in a portable way
We actually need a bytes in Python 3, and thanks to our nasty source
loader this will portably do the right thing.
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -233,7 +233,7 @@ class branchcache(dict):
def write(self, repo):
try:
f = repo.vfs(_filename(repo), "w", atomictemp=True)
- cachekey = [hex(self.tipnode), str(self.tiprev)]
+ cachekey = [hex(self.tipnode), '%d' % self.tiprev]
if self.filteredhash is not None:
cachekey.append(hex(self.filteredhash))
f.write(" ".join(cachekey) + '\n')
More information about the Mercurial-devel
mailing list