comparison mercurial/localrepo.py @ 4334:1cc5fc1d0994

Merge with crew-stable.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 09 Apr 2007 04:57:25 -0300
parents cb6107f78b92 cea5ba038a1d
children 4ddc6d374265
comparison
equal deleted inserted replaced
4325:aa26759c6fb3 4334:1cc5fc1d0994
415 partial, last, lrev = {}, nullid, nullrev 415 partial, last, lrev = {}, nullid, nullrev
416 return partial, last, lrev 416 return partial, last, lrev
417 417
418 def _writebranchcache(self, branches, tip, tiprev): 418 def _writebranchcache(self, branches, tip, tiprev):
419 try: 419 try:
420 f = self.opener("branch.cache", "w") 420 f = self.opener("branch.cache", "w", atomictemp=True)
421 f.write("%s %s\n" % (hex(tip), tiprev)) 421 f.write("%s %s\n" % (hex(tip), tiprev))
422 for label, node in branches.iteritems(): 422 for label, node in branches.iteritems():
423 f.write("%s %s\n" % (hex(node), label)) 423 f.write("%s %s\n" % (hex(node), label))
424 f.rename()
424 except IOError: 425 except IOError:
425 pass 426 pass
426 427
427 def _updatebranchcache(self, partial, start, end): 428 def _updatebranchcache(self, partial, start, end):
428 for r in xrange(start, end): 429 for r in xrange(start, end):