requirements: introduce a set of working directory specific requirements
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 10 Aug 2020 18:08:15 -0700
changeset 45394 bd56597b2254
parent 45393 d7dcc75a3eae
child 45395 8c466bcb0879
requirements: introduce a set of working directory specific requirements Some requirements like the SPARSE_REQUIREMENT is working directory specific and cannot be shared. We add a set which will contain all these requirements. This is not the best we can do, I think having a rich requirement class will be much better but that will be out of scope for this series. Differential Revision: https://phab.mercurial-scm.org/D8924
mercurial/requirements.py
--- a/mercurial/requirements.py	Sat Aug 08 16:37:59 2020 +0530
+++ b/mercurial/requirements.py	Mon Aug 10 18:08:15 2020 -0700
@@ -44,3 +44,8 @@
 
 # The repository use persistent nodemap for the changelog and the manifest.
 NODEMAP_REQUIREMENT = b'persistent-nodemap'
+
+# 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}