comparison 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
comparison
equal deleted inserted replaced
45385:05d19ca33b33 45386:034d94f8761b
43 COPIESSDC_REQUIREMENT = b'exp-copies-sidedata-changeset' 43 COPIESSDC_REQUIREMENT = b'exp-copies-sidedata-changeset'
44 44
45 # The repository use persistent nodemap for the changelog and the manifest. 45 # The repository use persistent nodemap for the changelog and the manifest.
46 NODEMAP_REQUIREMENT = b'persistent-nodemap' 46 NODEMAP_REQUIREMENT = b'persistent-nodemap'
47 47
48 # Denotes that the current repository is a share
49 SHARED_REQUIREMENT = b'shared'
50
51 # Denotes that current repository is a share and the shared source path is
52 # relative to the current repository root path
53 RELATIVE_SHARED_REQUIREMENT = b'relshared'
54
48 # List of requirements which are working directory specific 55 # List of requirements which are working directory specific
49 # These requirements cannot be shared between repositories if they 56 # These requirements cannot be shared between repositories if they
50 # share the same store 57 # share the same store
51 WORKING_DIR_REQUIREMENTS = {SPARSE_REQUIREMENT} 58 # * sparse is a working directory specific functionality and hence working
59 # directory specific requirement
60 # * SHARED_REQUIREMENT and RELATIVE_SHARED_REQUIREMENT are requirements which
61 # represents that the current working copy/repository shares store of another
62 # repo. Hence both of them should be stored in working copy
63 WORKING_DIR_REQUIREMENTS = {
64 SPARSE_REQUIREMENT,
65 SHARED_REQUIREMENT,
66 RELATIVE_SHARED_REQUIREMENT,
67 }