Mercurial > hg
diff mercurial/requirements.py @ 45386:034d94f8761b
requirements: introduce constants for `shared` and `relshared` requirements
We add them to `WORKING_DIR_REQUIREMENTS` too as they should be stored in
`.hg/requires` and have information about the type of working copy.
Differential Revision: https://phab.mercurial-scm.org/D8926
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 11 Aug 2020 13:43:43 +0530 |
parents | bd56597b2254 |
children | d252f51ab032 |
line wrap: on
line diff
--- a/mercurial/requirements.py Mon Aug 10 15:47:21 2020 +0530 +++ b/mercurial/requirements.py Tue Aug 11 13:43:43 2020 +0530 @@ -45,7 +45,23 @@ # The repository use persistent nodemap for the changelog and the manifest. NODEMAP_REQUIREMENT = b'persistent-nodemap' +# Denotes that the current repository is a share +SHARED_REQUIREMENT = b'shared' + +# Denotes that current repository is a share and the shared source path is +# relative to the current repository root path +RELATIVE_SHARED_REQUIREMENT = b'relshared' + # List of requirements which are working directory specific # These requirements cannot be shared between repositories if they # share the same store -WORKING_DIR_REQUIREMENTS = {SPARSE_REQUIREMENT} +# * sparse is a working directory specific functionality and hence working +# directory specific requirement +# * SHARED_REQUIREMENT and RELATIVE_SHARED_REQUIREMENT are requirements which +# represents that the current working copy/repository shares store of another +# repo. Hence both of them should be stored in working copy +WORKING_DIR_REQUIREMENTS = { + SPARSE_REQUIREMENT, + SHARED_REQUIREMENT, + RELATIVE_SHARED_REQUIREMENT, +}