Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 4417:0912d8df5e19
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 08 May 2007 11:42:48 -0500 |
parents | 9770d260a405 1a63b44f90c9 |
children | 3900f684a150 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat May 05 15:56:49 2007 +0900 +++ b/mercurial/localrepo.py Tue May 08 11:42:48 2007 -0500 @@ -397,6 +397,10 @@ f = self.opener("branch.cache") lines = f.read().split('\n') f.close() + except (IOError, OSError): + return {}, nullid, nullrev + + try: last, lrev = lines.pop(0).split(" ", 1) last, lrev = bin(last), int(lrev) if not (lrev < self.changelog.count() and @@ -422,7 +426,7 @@ for label, node in branches.iteritems(): f.write("%s %s\n" % (hex(node), label)) f.rename() - except IOError: + except (IOError, OSError): pass def _updatebranchcache(self, partial, start, end):