##// END OF EJS Templates
use atomictemp files to write branch.cache
Alexis S. L. Carvalho -
r4329:cea5ba03 default
parent child Browse files
Show More
@@ -421,10 +421,11 b' class localrepository(repo.repository):'
421
421
422 def _writebranchcache(self, branches, tip, tiprev):
422 def _writebranchcache(self, branches, tip, tiprev):
423 try:
423 try:
424 f = self.opener("branch.cache", "w")
424 f = self.opener("branch.cache", "w", atomictemp=True)
425 f.write("%s %s\n" % (hex(tip), tiprev))
425 f.write("%s %s\n" % (hex(tip), tiprev))
426 for label, node in branches.iteritems():
426 for label, node in branches.iteritems():
427 f.write("%s %s\n" % (hex(node), label))
427 f.write("%s %s\n" % (hex(node), label))
428 f.rename()
428 except IOError:
429 except IOError:
429 pass
430 pass
430
431
General Comments 0
You need to be logged in to leave comments. Login now