diff 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
line wrap: on
line diff
--- a/mercurial/error.py	Mon Sep 09 14:03:12 2019 +0200
+++ b/mercurial/error.py	Wed Sep 04 00:59:15 2019 +0200
@@ -44,6 +44,13 @@
 class RevlogError(StorageError):
     __bytes__ = _tobytes
 
+class SidedataHashError(RevlogError):
+
+    def __init__(self, key, expected, got):
+        self.sidedatakey = key
+        self.expecteddigest = expected
+        self.actualdigest = got
+
 class FilteredIndexError(IndexError):
     __bytes__ = _tobytes