##// END OF EJS Templates
branch.cache: silently ignore I/O and OS errors
Matt Mackall -
r4415:1a63b44f default
parent child Browse files
Show More
@@ -401,6 +401,10 b' class localrepository(repo.repository):'
401 401 f = self.opener("branch.cache")
402 402 lines = f.read().split('\n')
403 403 f.close()
404 except (IOError, OSError):
405 return {}, nullid, nullrev
406
407 try:
404 408 last, lrev = lines.pop(0).split(" ", 1)
405 409 last, lrev = bin(last), int(lrev)
406 410 if not (lrev < self.changelog.count() and
@@ -426,7 +430,7 b' class localrepository(repo.repository):'
426 430 for label, node in branches.iteritems():
427 431 f.write("%s %s\n" % (hex(node), label))
428 432 f.rename()
429 except IOError:
433 except (IOError, OSError):
430 434 pass
431 435
432 436 def _updatebranchcache(self, partial, start, end):
General Comments 0
You need to be logged in to leave comments. Login now