changeset 51050:0d33f4b0c4cb

revlog: remove legacy usage of `_censorable` All core code is now getting the setting from the FeatureConfig object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 11:04:07 +0200
parents 3977068c638c
children 21ef03239f43
files mercurial/revlog.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Oct 10 11:02:24 2023 +0200
+++ b/mercurial/revlog.py	Tue Oct 10 11:04:07 2023 +0200
@@ -2304,7 +2304,9 @@
                     % (self.display_id, pycompat.bytestr(revornode))
                 )
         except error.RevlogError:
-            if self._censorable and storageutil.iscensoredtext(text):
+            if self.feature_config.censorable and storageutil.iscensoredtext(
+                text
+            ):
                 raise error.CensoredNodeError(self.display_id, node, text)
             raise
 
@@ -3114,14 +3116,14 @@
 
     def iscensored(self, rev):
         """Check if a file revision is censored."""
-        if not self._censorable:
+        if not self.feature_config.censorable:
             return False
 
         return self.flags(rev) & REVIDX_ISCENSORED
 
     def _peek_iscensored(self, baserev, delta):
         """Quickly check if a delta produces a censored revision."""
-        if not self._censorable:
+        if not self.feature_config.censorable:
             return False
 
         return storageutil.deltaiscensored(delta, baserev, self.rawsize)