D10657: sidedata: use the "feature" to detect that sidedata are enabled

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue May 4 14:20:40 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is more versatile than relying on the revlogv2 requirements.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3366,7 +3366,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))



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list