Mercurial > hg-stable
comparison tests/test-remotefilelog-corrupt-cache.t @ 47549:e972077600e5
remotefilelog: stop using RuntimeError for control flow
We introduce a new exception to handle the various failure categories,
rather than relying on RuntimeError.
Differential Revision: https://phab.mercurial-scm.org/D11006
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 07 Jul 2021 11:45:17 -0400 |
parents | 5830539c46be |
children | af0b21d5a930 |
comparison
equal
deleted
inserted
replaced
47548:5830539c46be | 47549:e972077600e5 |
---|---|
36 > validatecache=off | 36 > validatecache=off |
37 > EOF | 37 > EOF |
38 $ chmod u+w $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 | 38 $ chmod u+w $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 |
39 $ echo x > $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 | 39 $ echo x > $CACHEDIR/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 |
40 $ hg up tip 2>&1 | egrep "^[^ ].*unexpected remotefilelog" | 40 $ hg up tip 2>&1 | egrep "^[^ ].*unexpected remotefilelog" |
41 RuntimeError: unexpected remotefilelog header: illegal format | 41 abort: unexpected remotefilelog header: illegal format (no-py3 !) |
42 hgext.remotefilelog.shallowutil.BadRemotefilelogHeader: unexpected remotefilelog header: illegal format (py3 !) | |
42 | 43 |
43 Verify detection and remediation when remotefilelog.validatecachelog is set | 44 Verify detection and remediation when remotefilelog.validatecachelog is set |
44 | 45 |
45 $ cat >> .hg/hgrc <<EOF | 46 $ cat >> .hg/hgrc <<EOF |
46 > [remotefilelog] | 47 > [remotefilelog] |