diff -r 279430eeefdb -r fc06c5260639 mercurial/branchmap.py --- a/mercurial/branchmap.py Sun Mar 12 00:49:19 2017 -0500 +++ b/mercurial/branchmap.py Sun Mar 12 00:42:46 2017 -0500 @@ -233,7 +233,7 @@ 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')