branch | stable |
changeset 27917 | 97e0dc6d248c |
parent 27916 | 9a09a9cfa503 |
child 28265 | 332926212ef8 |
--- a/mercurial/repoview.py Wed Jan 20 13:40:59 2016 -0800 +++ b/mercurial/repoview.py Wed Jan 20 13:43:01 2016 -0800 @@ -150,6 +150,13 @@ count = len(data) / 4 hidden = frozenset(struct.unpack('>%ii' % count, data)) return hidden + except struct.error: + repo.ui.debug('corrupted hidden cache\n') + # No need to fix the content as it will get rewritten + return None + except (IOError, OSError): + repo.ui.debug('cannot read hidden cache\n') + return None finally: if fh: fh.close()