diff -r aa26759c6fb3 -r f4a1eac52d43 mercurial/localrepo.py --- a/mercurial/localrepo.py Sat Apr 07 04:45:27 2007 -0300 +++ b/mercurial/localrepo.py Tue Apr 10 14:05:15 2007 -0500 @@ -417,10 +417,11 @@ def _writebranchcache(self, branches, tip, tiprev): try: - f = self.opener("branch.cache", "w") + f = self.opener("branch.cache", "w", atomictemp=True) f.write("%s %s\n" % (hex(tip), tiprev)) for label, node in branches.iteritems(): f.write("%s %s\n" % (hex(node), label)) + f.rename() except IOError: pass