##// END OF EJS Templates
localrepo: only use 'bookmarksinstore' requirement if we have 'store'...
Pulkit Goyal -
r45857:dc457177 default
parent child Browse files
Show More
@@ -3315,6 +3315,28 b' def newreporequirements(ui, createopts):'
3315 return requirements
3315 return requirements
3316
3316
3317
3317
3318 def checkrequirementscompat(ui, requirements):
3319 """ Checks compatibility of repository requirements enabled and disabled.
3320
3321 Returns a set of requirements which needs to be dropped because dependend
3322 requirements are not enabled. Also warns users about it """
3323
3324 dropped = set()
3325
3326 if b'store' not in requirements:
3327 if bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT in requirements:
3328 ui.warn(
3329 _(
3330 b'ignoring enabled \'format.bookmarks-in-store\' config '
3331 b'beacuse it is incompatible with disabled '
3332 b'\'format.usestore\' config\n'
3333 )
3334 )
3335 dropped.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
3336
3337 return dropped
3338
3339
3318 def filterknowncreateopts(ui, createopts):
3340 def filterknowncreateopts(ui, createopts):
3319 """Filters a dict of repo creation options against options that are known.
3341 """Filters a dict of repo creation options against options that are known.
3320
3342
@@ -3389,6 +3411,7 b' def createrepository(ui, path, createopt'
3389 )
3411 )
3390
3412
3391 requirements = newreporequirements(ui, createopts=createopts)
3413 requirements = newreporequirements(ui, createopts=createopts)
3414 requirements -= checkrequirementscompat(ui, requirements)
3392
3415
3393 wdirvfs = vfsmod.vfs(path, expandpath=True, realpath=True)
3416 wdirvfs = vfsmod.vfs(path, expandpath=True, realpath=True)
3394
3417
@@ -279,3 +279,8 b' verify bookmark behavior after unshare'
279 bm3 4:62f4ded848e4
279 bm3 4:62f4ded848e4
280 bm4 5:92793bfc8cad
280 bm4 5:92793bfc8cad
281 $ cd ..
281 $ cd ..
282
283 Test that if store is disabled, we drop the bookmarksinstore requirement
284
285 $ hg init brokenrepo --config format.bookmarks-in-store=True --config format.usestore=false
286 ignoring enabled 'format.bookmarks-in-store' config beacuse it is incompatible with disabled 'format.usestore' config
General Comments 0
You need to be logged in to leave comments. Login now