Mercurial > public > mercurial-scm > hg-stable
diff mercurial/error.py @ 50389:bf16ef96defe stable
rust-dirstate: fall back to v1 if reading v2 failed
This will help us not fail when a v1 dirstate is present on disk while a v2
was expected (which could happen with a racy/interrupted upgrade).
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 05 Jun 2023 16:43:27 +0200 |
parents | 3dbc7b1ecaba |
children | 9d3721552b6c |
line wrap: on
line diff
--- a/mercurial/error.py Mon Jun 05 17:29:52 2023 +0200 +++ b/mercurial/error.py Mon Jun 05 16:43:27 2023 +0200 @@ -650,6 +650,13 @@ __bytes__ = _tobytes +class CorruptedDirstate(Exception): + """error raised the dirstate appears corrupted on-disk. It may be due to + a dirstate version mismatch (i.e. expecting v2 and finding v1 on disk).""" + + __bytes__ = _tobytes + + class PeerTransportError(Abort): """Transport-level I/O error when communicating with a peer repo."""