sapling/mercurial
Laurent Charignon 7dcb9bf272 repoview: fix corrupted hiddencache crash Mercurial (issue5042)
Before this patch if the hiddencache existed but was empty, it would crash
mercurial. This patch adds exception handling when reading the hiddencache to
avoid the issue.
When encountering a corrupted cache file we print a devel warning. There would
be no point in issuing a normal warning as the user wouldn't be able to do
anything about the situation.

The warning looks like:

devel-warn: corrupted hidden cache, removing it at: /path/to/repoview.py
2016-01-20 13:43:01 -08:00
..
default.d mergetools.rc: find OSX FileMerge in the new location inside Xcode 4.3 2015-10-16 11:37:34 +02:00
help scmutil: support background file closing 2016-01-14 13:34:59 -08:00
hgweb hgweb: support rendering a sub-topic 2015-12-30 17:15:10 -07:00
httpclient httpclient: update to 938f2107d6e2 of httpplus 2015-12-31 13:19:20 -05:00
pure osutil: implement __enter__ and __exit__ on posixfile 2016-01-02 16:41:57 -08:00
templates templates: use canvaswidth instead of fixed width for canvas (issue2683) 2016-01-21 02:42:01 +09:00
__init__.py mercurial: support loading modules from zipimporter 2015-12-03 21:25:05 -08:00
ancestor.py ancestor: use absolute_import 2015-08-07 19:45:48 -07:00
archival.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
base85.c base85: clean up function definition style 2015-11-11 19:10:45 -05:00
bdiff.c bdiff: avoid a memory error on malloc failure 2013-10-30 16:03:42 -05:00
bookmarks.py with: use context manager for wlock in _writeactive 2016-01-15 13:14:45 -08:00
branchmap.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
bundle2.py cleanup: use modern @property/@foo.setter property specification 2016-01-16 10:50:28 -05:00
bundlerepo.py bundlerepo: use context manager for file I/O in _writetempbundle 2016-01-12 14:48:27 -08:00
byterange.py byterange: use absolute_import 2015-12-21 21:42:14 -08:00
changegroup.py with: use context manager for transaction in changegroup apply 2016-01-15 13:14:50 -08:00
changelog.py changelog: add a new method to get files modified by a changeset 2015-12-18 13:45:55 -08:00
cmdutil.py with: use context manager in amend 2016-01-15 13:14:50 -08:00
commands.py backout: fix --no-commit option (issue5054) 2016-01-20 08:16:58 -08:00
commandserver.py commandserver: drop tell() and seek() from channels (issue5049) 2016-01-20 00:08:00 +09:00
config.py config: add hasconfig method and supporting plumbing 2016-01-07 19:45:03 -08:00
context.py context: don't use util.cachefunc due to cycle creation (issue5043) 2016-01-17 12:10:30 -08:00
copies.py copies: fix detection of divergent directory renames 2016-01-13 10:10:05 -06:00
crecord.py crecord: edit during hg crecord should preserve cursor position (issue5041) 2016-01-20 11:21:13 -08:00
dagparser.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
dagutil.py dagutil: use absolute_import 2015-08-08 19:04:09 -07:00
demandimport.py demandimport: update obsolete comment 2015-12-23 16:22:20 -08:00
destutil.py destmerge: extract logic based on branch heads in its own function 2015-10-15 03:15:54 +01:00
diffhelpers.c diffhelpers: fix botched return statement from e48d70075d8a 2015-01-28 13:34:20 -05:00
dirs.c dirs._addpath: reinstate use of Py_CLEAR 2015-04-07 20:43:04 -07:00
dirstate.py dirstate: add a way to get the ignore file/line matching an ignored file 2016-01-05 07:52:04 -08:00
discovery.py discovery: pass pushop to _nowarnheads 2015-11-10 11:16:25 -08:00
dispatch.py dispatch: copy inferrepo attribute to alias commands 2016-01-04 21:40:05 +09:00
dummycert.pem ssl: on OS X, use a dummy cert to trick Python/OpenSSL to use system CA certs 2014-09-26 02:19:48 +02:00
encoding.py encoding: escape U+007F (DEL) character in JSON 2016-01-16 18:30:01 +09:00
error.py error: make InterventionRequired take a hint 2015-12-23 08:52:52 +00:00
exchange.py exchange: implement function for inferring bundle specification 2016-01-14 22:49:03 -08:00
exewrapper.c exewrapper: add comments about PYTHONHOME 2015-10-14 12:23:49 +02:00
extensions.py cleanup: remove superfluous space after space after equals (python) 2015-12-31 08:16:59 +00:00
fancyopts.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
filelog.py filelog: use absolute_import 2015-08-08 19:11:42 -07:00
filemerge.py origpath: move from cmdutil to scmutil 2016-01-02 03:02:57 -08:00
fileset.py fileset: add hint for list error to use or 2015-12-23 17:54:13 +00:00
formatter.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
graphmod.py graphmod: compute slow revset query once prior to reachableroots (issue4782) 2015-09-08 23:00:44 +09:00
hbisect.py with: use context manager in bisect save_state 2016-01-15 13:14:49 -08:00
help.py mercurial: pass ui to extensions.load (issue5007) 2015-12-17 10:30:17 +00:00
hg.py cleanup: remove superfluous space after space after equals (python) 2015-12-31 08:16:59 +00:00
hook.py dirstate: don't write repo.currenttransaction to repo.dirstate if repo 2015-12-03 01:38:21 +01:00
httpconnection.py httpconnection: remove a mutable default argument 2015-09-24 00:54:30 -07:00
httppeer.py cleanup: remove superfluous space after space after equals (python) 2015-12-31 08:16:59 +00:00
i18n.py i18n: use absolute_import 2015-08-08 19:28:49 -07:00
keepalive.py keepalive: use print function 2015-06-21 23:14:54 -07:00
localrepo.py localrepo: don't reference transaction from hook closure (issue5043) 2016-01-17 14:14:15 -08:00
lock.py lock: turn a lock into a Python context manager 2016-01-15 13:14:45 -08:00
lsprof.py lsprof: use print function 2016-01-02 11:40:53 -08:00
lsprofcalltree.py lsprofcalltree: use print function 2016-01-02 11:45:29 -08:00
mail.py mail: use print function 2016-01-02 11:47:07 -08:00
manifest.c lazymanifest: check more return values in filtercopy 2015-12-31 13:31:42 -05:00
manifest.py manifest: use absolute_import 2015-12-21 21:35:46 -08:00
match.py match: add option to return line and lineno from readpattern 2015-12-26 19:40:38 -08:00
mdiff.py mdiff: don't emit a diff header for empty trivial deltas 2016-01-11 22:00:07 -05:00
merge.py with: use context manager in merge update 2016-01-15 13:14:49 -08:00
minirst.py minirst: change hgrole to use single quotes 2016-01-12 06:03:36 +00:00
mpatch.c mpatch: rewrite pointer overflow checks 2013-12-11 18:33:42 -06:00
namespaces.py namespaces: use absolute_import 2015-08-08 19:42:58 -07:00
node.py node: add 'nullhex', hex-encoded nullid 2015-11-16 11:23:32 -08:00
obsolete.py obsolete: make _computeobsoleteset much faster 2016-01-13 21:52:26 -08:00
osutil.c mac: ignore resource fork when checking file sizes 2016-01-14 12:37:15 -06:00
parser.py parser: move unescape helper from templater 2015-09-10 23:25:10 +09:00
parsers.c cleanup: remove superfluous space after space after equals (C) 2015-12-31 08:17:15 +00:00
patch.py diff: don't crash when merged-in addition is copied 2016-01-14 10:22:55 -08:00
pathencode.c pathencode: remove an unused assignment 2015-12-12 20:59:37 -08:00
pathutil.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
peer.py peer: use absolute_import 2015-08-08 19:45:45 -07:00
phases.py with: use context manager for transaction in pushphase 2016-01-15 13:14:49 -08:00
posix.py posix: fix test-permissions regression 2015-11-09 15:53:11 -06:00
progress.py spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
pushkey.py pushkey: use absolute_import 2015-08-08 19:57:27 -07:00
pvec.py pvec: use absolute_import 2015-12-21 21:32:58 -08:00
py3kcompat.py py3compat: use absolute_import 2015-12-21 21:31:57 -08:00
registrar.py registrar: add delayregistrar class to register function in extensions 2015-12-29 23:58:30 +09:00
repair.py with: use context manager for transaction in strip 2016-01-15 13:14:49 -08:00
repoview.py repoview: fix corrupted hiddencache crash Mercurial (issue5042) 2016-01-20 13:43:01 -08:00
revlog.py revlog: remove unnecessary cache validation in _chunks 2015-11-22 17:57:35 -08:00
revset.py cleanup: remove superfluous space after space after equals (python) 2015-12-31 08:16:59 +00:00
scmposix.py scmposix: use absolute_import 2015-12-21 21:24:49 -08:00
scmutil.py scmutil: support background file closing 2016-01-14 13:34:59 -08:00
scmwindows.py scmwindows: use absolute_import 2015-12-21 21:21:09 -08:00
setdiscovery.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
similar.py similar: use absolute_import 2015-12-12 23:17:22 -08:00
simplemerge.py simplemerge: move conflict warning message to filemerge 2015-10-09 13:54:52 -07:00
sshpeer.py sshpeer: make remotelock a context manager 2016-01-15 13:14:50 -08:00
sshserver.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
sslutil.py sslutil: fix reversed logic (issue5034) 2016-01-08 16:27:25 +01:00
statichttprepo.py statichttprepo: implement __enter__ and __exit__ on httprangeheader 2016-01-02 15:33:01 -08:00
store.py l10n: use %d instead of %s for numbers 2015-10-14 22:29:03 -04:00
streamclone.py streamclone: use backgroundfilecloser (issue4889) 2016-01-14 13:44:01 -08:00
strutil.py strutil: use absolute_import 2015-08-08 20:01:40 -07:00
subrepo.py with: use context manager in subrepo storeclean 2016-01-15 13:14:50 -08:00
tagmerge.py tagmerge: use absolute_import 2015-08-08 20:10:46 -07:00
tags.py tags: create new sortdict for performance reasons 2015-11-12 13:16:04 -08:00
templatefilters.py merge with stable 2015-11-04 15:17:52 -06:00
templatekw.py templatekw: add {namespaces} keyword 2016-01-12 23:56:48 +09:00
templater.py templater: make get(dict, key) return a single value 2016-01-16 13:53:32 +09:00
transaction.py transaction: turn a transaction into a Python context manager 2016-01-15 13:14:47 -08:00
treediscovery.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
ui.py config: add hasconfig method and supporting plumbing 2016-01-07 19:45:03 -08:00
unionrepo.py merge with stable 2016-01-13 15:47:37 -06:00
url.py url: drop support for python2.5 2015-10-15 17:21:08 -04:00
util.h util: fix the check for non-C99 compilers (issue4605) 2015-04-20 22:21:57 -05:00
util.py util: rename ctxmanager's __call__ method to enter 2016-01-14 09:31:01 -08:00
verify.py with: use context manager in verify 2016-01-15 13:14:49 -08:00
win32.py win32: use absolute_import 2015-08-08 18:52:59 -07:00
windows.py windows: correct the import of win32 2015-12-16 13:33:43 -05:00
wireproto.py wireproto: support disabling bundle1 only if repo is generaldelta 2015-12-20 11:56:24 -08:00
worker.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00