##// END OF EJS Templates
requirements: move "bookmark in store" requirements in the right module...
marmoute -
r49445:dfbfa802 default
parent child Browse files
Show More
@@ -22,6 +22,7 b' from . import ('
22 22 error,
23 23 obsutil,
24 24 pycompat,
25 requirements,
25 26 scmutil,
26 27 txnutil,
27 28 util,
@@ -36,11 +37,9 b' from .utils import ('
36 37 # custom styles
37 38 activebookmarklabel = b'bookmarks.active bookmarks.current'
38 39
39 BOOKMARKS_IN_STORE_REQUIREMENT = b'bookmarksinstore'
40
41 40
42 41 def bookmarksinstore(repo):
43 return BOOKMARKS_IN_STORE_REQUIREMENT in repo.requirements
42 return requirements.BOOKMARKS_IN_STORE_REQUIREMENT in repo.requirements
44 43
45 44
46 45 def bookmarksvfs(repo):
@@ -1288,7 +1288,7 b' class localrepository(object):'
1288 1288 requirementsmod.CHANGELOGV2_REQUIREMENT,
1289 1289 requirementsmod.SPARSEREVLOG_REQUIREMENT,
1290 1290 requirementsmod.NODEMAP_REQUIREMENT,
1291 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT,
1291 requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT,
1292 1292 requirementsmod.SHARESAFE_REQUIREMENT,
1293 1293 requirementsmod.DIRSTATE_V2_REQUIREMENT,
1294 1294 }
@@ -3652,7 +3652,7 b' def newreporequirements(ui, createopts):'
3652 3652 requirements.add(b'lfs')
3653 3653
3654 3654 if ui.configbool(b'format', b'bookmarks-in-store'):
3655 requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
3655 requirements.add(requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT)
3656 3656
3657 3657 if ui.configbool(b'format', b'use-persistent-nodemap'):
3658 3658 requirements.add(requirementsmod.NODEMAP_REQUIREMENT)
@@ -3704,7 +3704,7 b' def checkrequirementscompat(ui, requirem'
3704 3704 dropped = set()
3705 3705
3706 3706 if requirementsmod.STORE_REQUIREMENT not in requirements:
3707 if bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT in requirements:
3707 if requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT in requirements:
3708 3708 ui.warn(
3709 3709 _(
3710 3710 b'ignoring enabled \'format.bookmarks-in-store\' config '
@@ -3712,7 +3712,7 b' def checkrequirementscompat(ui, requirem'
3712 3712 b'\'format.usestore\' config\n'
3713 3713 )
3714 3714 )
3715 dropped.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
3715 dropped.add(requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT)
3716 3716
3717 3717 if (
3718 3718 requirementsmod.SHARED_REQUIREMENT in requirements
@@ -66,6 +66,10 b" RELATIVE_SHARED_REQUIREMENT = b'relshare"
66 66 # `.hg/store/requires` are present.
67 67 SHARESAFE_REQUIREMENT = b'share-safe'
68 68
69 # Bookmarks must be stored in the `store` part of the repository and will be
70 # share accross shares
71 BOOKMARKS_IN_STORE_REQUIREMENT = b'bookmarksinstore'
72
69 73 # List of requirements which are working directory specific
70 74 # These requirements cannot be shared between repositories if they
71 75 # share the same store
General Comments 0
You need to be logged in to leave comments. Login now