changeset 47260:ccdd280d1d0d

sidedata: use the "feature" to detect that sidedata are enabled This is more versatile than relying on the revlogv2 requirements. Differential Revision: https://phab.mercurial-scm.org/D10657
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 04 May 2021 02:52:24 +0200
parents 07641bafa646
children 80164d50ae3d
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon May 03 23:40:05 2021 +0200
+++ b/mercurial/localrepo.py	Tue May 04 02:52:24 2021 +0200
@@ -3372,7 +3372,7 @@
         return self.pathto(fp.name[len(self.root) + 1 :])
 
     def register_wanted_sidedata(self, category):
-        if requirementsmod.REVLOGV2_REQUIREMENT not in self.requirements:
+        if repository.REPO_FEATURE_SIDE_DATA not in self.features:
             # Only revlogv2 repos can want sidedata.
             return
         self._wanted_sidedata.add(pycompat.bytestr(category))