Mercurial > public > mercurial-scm > hg
comparison mercurial/branchmap.py @ 24728:75688a6f0bca
branchcache: stay silent if failing to read cache files
The warning has in some cases incorrectly attributed unrelated problems to rbc.
Instead, just do like the branch head cache does and stay quiet when reading
fails. The cache will be missing the first time a repo is used. It is a normal
situation and there is no reason to make a note of that.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 14 Jan 2015 01:15:26 +0100 |
parents | 467a33142425 |
children | 38117278f295 |
comparison
equal
deleted
inserted
replaced
24727:5668202cfaaf | 24728:75688a6f0bca |
---|---|
314 try: | 314 try: |
315 bndata = repo.vfs.read(_rbcnames) | 315 bndata = repo.vfs.read(_rbcnames) |
316 self._rbcsnameslen = len(bndata) # for verification before writing | 316 self._rbcsnameslen = len(bndata) # for verification before writing |
317 self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] | 317 self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] |
318 except (IOError, OSError), inst: | 318 except (IOError, OSError), inst: |
319 repo.ui.debug("couldn't read revision branch cache names: %s\n" % | |
320 inst) | |
321 if readonly: | 319 if readonly: |
322 # don't try to use cache - fall back to the slow path | 320 # don't try to use cache - fall back to the slow path |
323 self.branchinfo = self._branchinfo | 321 self.branchinfo = self._branchinfo |
324 | 322 |
325 if self._names: | 323 if self._names: |