comparison mercurial/branchmap.py @ 31348:fc06c5260639

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.
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 00:42:46 -0500
parents 279430eeefdb
children 37acdf027ae2
comparison
equal deleted inserted replaced
31347:279430eeefdb 31348:fc06c5260639
231 self._closednodes) 231 self._closednodes)
232 232
233 def write(self, repo): 233 def write(self, repo):
234 try: 234 try:
235 f = repo.vfs(_filename(repo), "w", atomictemp=True) 235 f = repo.vfs(_filename(repo), "w", atomictemp=True)
236 cachekey = [hex(self.tipnode), str(self.tiprev)] 236 cachekey = [hex(self.tipnode), '%d' % self.tiprev]
237 if self.filteredhash is not None: 237 if self.filteredhash is not None:
238 cachekey.append(hex(self.filteredhash)) 238 cachekey.append(hex(self.filteredhash))
239 f.write(" ".join(cachekey) + '\n') 239 f.write(" ".join(cachekey) + '\n')
240 nodecount = 0 240 nodecount = 0
241 for label, nodes in sorted(self.iteritems()): 241 for label, nodes in sorted(self.iteritems()):