Patchwork D8771: localrepo: only use BOOKMARKS_IN_STORE_REQUIRMENT is we have a store

login
register
mail settings
Submitter phabricator
Date July 21, 2020, 8:32 a.m.
Message ID <differential-rev-PHID-DREV-wiqazcabd4w2yxfjno2j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46813/
State Superseded
Headers show

Comments

phabricator - July 21, 2020, 8:32 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This adds check that if we are using store and if we are not, we skip adding the
  BOOKMARKS_IN_STORE_REQUIREMENT.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3548,6 +3548,7 @@ 
     Extensions can wrap this function to specify custom requirements for
     new repositories.
     """
+    usestore = False
     # If the repo is being created from a shared repository, we copy
     # its requirements.
     if b'sharedrepo' in createopts:
@@ -3576,6 +3577,7 @@ 
 
     requirements = {b'revlogv1'}
     if ui.configbool(b'format', b'usestore'):
+        usestore = True
         requirements.add(b'store')
         if ui.configbool(b'format', b'usefncache'):
             requirements.add(b'fncache')
@@ -3636,7 +3638,7 @@ 
     if createopts.get(b'lfs'):
         requirements.add(b'lfs')
 
-    if ui.configbool(b'format', b'bookmarks-in-store'):
+    if ui.configbool(b'format', b'bookmarks-in-store') and usestore:
         requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
 
     if ui.configbool(b'format', b'use-persistent-nodemap'):