# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1567808775 -7200
#      Sat Sep 07 00:26:15 2019 +0200
# Node ID 3674797ae8b9a7e8a3606633b2afebb3f9297fd8
# Parent  01304095256c2366ddb19d463a8e4e9d0431a0d1
flagprocessors: move _flagserrorclass attribute on revlog & co

This is a small duplication, and the last bit we need to get rid of the mixin.

Honestly, I am not fan of that class attribute and it mostly exist to accomodate
The simple-storage whose usage of flag processors is dumbious and that is
currently dead code anyway. However I don't want to be pulled into futher
unrelated cleaning so it is a small price to pay.

Differential Revision: https://phab.mercurial-scm.org/D6822

diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -50,6 +50,7 @@
 class remotefilelog(flagutil.flagprocessorsmixin):
 
     _generaldelta = True
+    _flagserrorclass = error.RevlogError
 
     def __init__(self, opener, path, repo):
         self.opener = opener
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -298,6 +298,9 @@
     If `upperboundcomp` is not None, this is the expected maximal gain from
     compression for the data content.
     """
+
+    _flagserrorclass = error.RevlogError
+
     def __init__(self, opener, indexfile, datafile=None, checkambig=False,
                  mmaplargeindex=False, censorable=False,
                  upperboundcomp=None):
diff --git a/mercurial/revlogutils/flagutil.py b/mercurial/revlogutils/flagutil.py
--- a/mercurial/revlogutils/flagutil.py
+++ b/mercurial/revlogutils/flagutil.py
@@ -87,8 +87,6 @@
     See the documentation of the ``_processflags`` method for details.
     """
 
-    _flagserrorclass = error.RevlogError
-
 def processflagswrite(revlog, text, flags, sidedata):
     """Inspect revision data flags and applies write transformations defined
     by registered flag processors.