Patchwork D12425: rhg: allow loading repos with `bookmarksinstore` requirement

login
register
mail settings
Submitter phabricator
Date April 1, 2022, 6:09 a.m.
Message ID <differential-rev-PHID-DREV-2nyttzzdchr3wcmaqyjc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50771/
State New
Headers show

Comments

phabricator - April 1, 2022, 6:09 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  `rhg` does support bookmarks, so it can load repos with the
  `bookmarksinstore` requirement just as well as other repos.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/requirements.rs

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-core/src/requirements.rs b/rust/hg-core/src/requirements.rs
--- a/rust/hg-core/src/requirements.rs
+++ b/rust/hg-core/src/requirements.rs
@@ -92,6 +92,8 @@ 
     // not should opt out by checking `has_sparse` and `has_narrow`.
     SPARSE_REQUIREMENT,
     NARROW_REQUIREMENT,
+    // rhg doesn't care about bookmarks at all yet
+    BOOKMARKS_IN_STORE_REQUIREMENT,
 ];
 
 // Copied from mercurial/requirements.py:
@@ -103,6 +105,11 @@ 
 #[allow(unused)]
 pub(crate) const NARROW_REQUIREMENT: &str = "narrowhg-experimental";
 
+/// Bookmarks must be stored in the `store` part of the repository and will be
+/// share accross shares
+#[allow(unused)]
+pub(crate) const BOOKMARKS_IN_STORE_REQUIREMENT: &str = "bookmarksinstore";
+
 /// Enables sparse working directory usage
 #[allow(unused)]
 pub(crate) const SPARSE_REQUIREMENT: &str = "exp-sparse";