# HG changeset patch # User Matt Mackall # Date 1161186411 18000 # Node ID fcf14d87e0a437d00523a03d7fcb2c85ee97d125 # Parent 196baf20232b04b266939c275db9e5c2fe2d2279 If we can't write the branch cache, fail quietly. diff -r 196baf20232b -r fcf14d87e0a4 mercurial/localrepo.py --- a/mercurial/localrepo.py Wed Oct 18 10:35:14 2006 +0200 +++ b/mercurial/localrepo.py Wed Oct 18 10:46:51 2006 -0500 @@ -322,11 +322,14 @@ return self.branchcache def _writebranchcache(self): - f = self.opener("branches.cache", "w") - t = self.changelog.tip() - f.write("%s %s\n" % (hex(t), self.changelog.count() - 1)) - for label, node in self.branchcache.iteritems(): - f.write("%s %s\n" % (hex(node), label)) + try: + f = self.opener("branches.cache", "w") + t = self.changelog.tip() + f.write("%s %s\n" % (hex(t), self.changelog.count() - 1)) + for label, node in self.branchcache.iteritems(): + f.write("%s %s\n" % (hex(node), label)) + except IOError: + pass def lookup(self, key): if key == '.':