Patchwork D8924: requirements: introduce a set of working directory specific requirements

login
register
mail settings
Submitter phabricator
Date Aug. 10, 2020, 3:24 p.m.
Message ID <differential-rev-PHID-DREV-rh45lbyjrq5k5uvdrprt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47024/
State Superseded
Headers show

Comments

phabricator - Aug. 10, 2020, 3:24 p.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8924

AFFECTED FILES
  mercurial/requirements.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/requirements.py b/mercurial/requirements.py
--- a/mercurial/requirements.py
+++ b/mercurial/requirements.py
@@ -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 = set([SPARSE_REQUIREMENT])
\ No newline at end of file