Patchwork D6822: flagprocessors: move _flagserrorclass attribute on revlog & co

login
register
mail settings
Submitter phabricator
Date Sept. 9, 2019, 9:26 p.m.
Message ID <24d5bedb755a6736e2e5deb2552a604a@localhost.localdomain>
Download mbox | patch
Permalink /patch/41616/
State Not Applicable
Headers show

Comments

phabricator - Sept. 9, 2019, 9:26 p.m.
marmoute updated this revision to Diff 16488.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6822?vs=16427&id=16488

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6822/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6822

AFFECTED FILES
  hgext/remotefilelog/remotefilelog.py
  mercurial/revlog.py
  mercurial/revlogutils/flagutil.py

CHANGE DETAILS




To: marmoute, yuja, durin42, indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

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.
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/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