comparison mercurial/error.py @ 50657: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
comparison
equal deleted inserted replaced
50656:9e08cfbe77b1 50657:bf16ef96defe
648 """error raised when a command is not able to read its state from file""" 648 """error raised when a command is not able to read its state from file"""
649 649
650 __bytes__ = _tobytes 650 __bytes__ = _tobytes
651 651
652 652
653 class CorruptedDirstate(Exception):
654 """error raised the dirstate appears corrupted on-disk. It may be due to
655 a dirstate version mismatch (i.e. expecting v2 and finding v1 on disk)."""
656
657 __bytes__ = _tobytes
658
659
653 class PeerTransportError(Abort): 660 class PeerTransportError(Abort):
654 """Transport-level I/O error when communicating with a peer repo.""" 661 """Transport-level I/O error when communicating with a peer repo."""
655 662
656 663
657 class InMemoryMergeConflictsError(Exception): 664 class InMemoryMergeConflictsError(Exception):