Mercurial > hg-stable
comparison mercurial/error.py @ 43034:294afb982a88
sidedata: add a function to read sidedata from revlog raw text
This implement the "reading" part of a `sidedata` flag processor.
Differential Revision: https://phab.mercurial-scm.org/D6890
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 04 Sep 2019 00:59:15 +0200 |
parents | 2393c4044214 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
43033:21025a4107d4 | 43034:294afb982a88 |
---|---|
41 """ | 41 """ |
42 __bytes__ = _tobytes | 42 __bytes__ = _tobytes |
43 | 43 |
44 class RevlogError(StorageError): | 44 class RevlogError(StorageError): |
45 __bytes__ = _tobytes | 45 __bytes__ = _tobytes |
46 | |
47 class SidedataHashError(RevlogError): | |
48 | |
49 def __init__(self, key, expected, got): | |
50 self.sidedatakey = key | |
51 self.expecteddigest = expected | |
52 self.actualdigest = got | |
46 | 53 |
47 class FilteredIndexError(IndexError): | 54 class FilteredIndexError(IndexError): |
48 __bytes__ = _tobytes | 55 __bytes__ = _tobytes |
49 | 56 |
50 class LookupError(RevlogError, KeyError): | 57 class LookupError(RevlogError, KeyError): |