[Request] [+ ] D8771: localrepo: only use BOOKMARKS_IN_STORE_REQUIRMENT is we have a store

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Jul 21 08:32:18 UTC 2020


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

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'):



To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200721/c43d2ff6/attachment.html>


More information about the Mercurial-patches mailing list