Mercurial > hg-stable
comparison mercurial/tags.py @ 14020:98f79a5c3086
tags: catch more corruption during cache parsing (issue2779)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 26 Apr 2011 10:51:19 -0500 |
parents | 4e33ef68b1f8 |
children | 0e6f622f31ca |
comparison
equal
deleted
inserted
replaced
14019:fbbd5f91d5e1 | 14020:98f79a5c3086 |
---|---|
183 headnode = bin(line[1]) | 183 headnode = bin(line[1]) |
184 cacheheads.append(headnode) | 184 cacheheads.append(headnode) |
185 if len(line) == 3: | 185 if len(line) == 3: |
186 fnode = bin(line[2]) | 186 fnode = bin(line[2]) |
187 cachefnode[headnode] = fnode | 187 cachefnode[headnode] = fnode |
188 except (ValueError, TypeError): | 188 except Exception: |
189 # corruption of the tags cache, just recompute it | 189 # corruption of the tags cache, just recompute it |
190 ui.warn(_('.hg/cache/tags is corrupt, rebuilding it\n')) | 190 ui.warn(_('.hg/cache/tags is corrupt, rebuilding it\n')) |
191 cacheheads = [] | 191 cacheheads = [] |
192 cacherevs = [] | 192 cacherevs = [] |
193 cachefnode = {} | 193 cachefnode = {} |