##// 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 error,
22 error,
23 obsutil,
23 obsutil,
24 pycompat,
24 pycompat,
25 requirements,
25 scmutil,
26 scmutil,
26 txnutil,
27 txnutil,
27 util,
28 util,
@@ -36,11 +37,9 b' from .utils import ('
36 # custom styles
37 # custom styles
37 activebookmarklabel = b'bookmarks.active bookmarks.current'
38 activebookmarklabel = b'bookmarks.active bookmarks.current'
38
39
39 BOOKMARKS_IN_STORE_REQUIREMENT = b'bookmarksinstore'
40
41
40
42 def bookmarksinstore(repo):
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 def bookmarksvfs(repo):
45 def bookmarksvfs(repo):
@@ -1288,7 +1288,7 b' class localrepository(object):'
1288 requirementsmod.CHANGELOGV2_REQUIREMENT,
1288 requirementsmod.CHANGELOGV2_REQUIREMENT,
1289 requirementsmod.SPARSEREVLOG_REQUIREMENT,
1289 requirementsmod.SPARSEREVLOG_REQUIREMENT,
1290 requirementsmod.NODEMAP_REQUIREMENT,
1290 requirementsmod.NODEMAP_REQUIREMENT,
1291 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT,
1291 requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT,
1292 requirementsmod.SHARESAFE_REQUIREMENT,
1292 requirementsmod.SHARESAFE_REQUIREMENT,
1293 requirementsmod.DIRSTATE_V2_REQUIREMENT,
1293 requirementsmod.DIRSTATE_V2_REQUIREMENT,
1294 }
1294 }
@@ -3652,7 +3652,7 b' def newreporequirements(ui, createopts):'
3652 requirements.add(b'lfs')
3652 requirements.add(b'lfs')
3653
3653
3654 if ui.configbool(b'format', b'bookmarks-in-store'):
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 if ui.configbool(b'format', b'use-persistent-nodemap'):
3657 if ui.configbool(b'format', b'use-persistent-nodemap'):
3658 requirements.add(requirementsmod.NODEMAP_REQUIREMENT)
3658 requirements.add(requirementsmod.NODEMAP_REQUIREMENT)
@@ -3704,7 +3704,7 b' def checkrequirementscompat(ui, requirem'
3704 dropped = set()
3704 dropped = set()
3705
3705
3706 if requirementsmod.STORE_REQUIREMENT not in requirements:
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 ui.warn(
3708 ui.warn(
3709 _(
3709 _(
3710 b'ignoring enabled \'format.bookmarks-in-store\' config '
3710 b'ignoring enabled \'format.bookmarks-in-store\' config '
@@ -3712,7 +3712,7 b' def checkrequirementscompat(ui, requirem'
3712 b'\'format.usestore\' config\n'
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 if (
3717 if (
3718 requirementsmod.SHARED_REQUIREMENT in requirements
3718 requirementsmod.SHARED_REQUIREMENT in requirements
@@ -66,6 +66,10 b" RELATIVE_SHARED_REQUIREMENT = b'relshare"
66 # `.hg/store/requires` are present.
66 # `.hg/store/requires` are present.
67 SHARESAFE_REQUIREMENT = b'share-safe'
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 # List of requirements which are working directory specific
73 # List of requirements which are working directory specific
70 # These requirements cannot be shared between repositories if they
74 # These requirements cannot be shared between repositories if they
71 # share the same store
75 # share the same store
General Comments 0
You need to be logged in to leave comments. Login now