diff mercurial/localrepo.py @ 47226:19d4802cb304

sidedata: add a 'side-data' repository feature and use it Most code don't really care how sidedata support is added, but it needs to know if it is present. To achieve this. we use the `repo.features` attributes with a new dedicated features". Having such centralised information is more robust and will help us to remove the sidedata requirements in a later changesets. Differential Revision: https://phab.mercurial-scm.org/D10617
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:29:52 +0200
parents 5eb5b866e517
children 21b3e6116bd1
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon May 03 12:29:41 2021 +0200
+++ b/mercurial/localrepo.py	Mon May 03 12:29:52 2021 +0200
@@ -737,6 +737,9 @@
     storevfs = store.vfs
     storevfs.options = resolvestorevfsoptions(ui, requirements, features)
 
+    if requirementsmod.REVLOGV2_REQUIREMENT in requirements:
+        features.add(repository.REPO_FEATURE_SIDE_DATA)
+
     # The cache vfs is used to manage cache files.
     cachevfs = vfsmod.vfs(cachepath, cacheaudited=True)
     cachevfs.createmode = store.createmode