Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
47225:d00177d08139 | 47226:19d4802cb304 |
---|---|
735 hgvfs.createmode = store.createmode | 735 hgvfs.createmode = store.createmode |
736 | 736 |
737 storevfs = store.vfs | 737 storevfs = store.vfs |
738 storevfs.options = resolvestorevfsoptions(ui, requirements, features) | 738 storevfs.options = resolvestorevfsoptions(ui, requirements, features) |
739 | 739 |
740 if requirementsmod.REVLOGV2_REQUIREMENT in requirements: | |
741 features.add(repository.REPO_FEATURE_SIDE_DATA) | |
742 | |
740 # The cache vfs is used to manage cache files. | 743 # The cache vfs is used to manage cache files. |
741 cachevfs = vfsmod.vfs(cachepath, cacheaudited=True) | 744 cachevfs = vfsmod.vfs(cachepath, cacheaudited=True) |
742 cachevfs.createmode = store.createmode | 745 cachevfs.createmode = store.createmode |
743 # The cache vfs is used to manage cache files related to the working copy | 746 # The cache vfs is used to manage cache files related to the working copy |
744 wcachevfs = vfsmod.vfs(wcachepath, cacheaudited=True) | 747 wcachevfs = vfsmod.vfs(wcachepath, cacheaudited=True) |