changeset 49223:4450faeb52bb

rust: make requirements public These can be used by any client crates (including `rhg`), no need to make them private to the crate. Differential Revision: https://phab.mercurial-scm.org/D12610
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 15 Apr 2022 22:02:07 +0200
parents 4ff4e23de7df
children 2ab79873786e
files rust/hg-core/src/requirements.rs
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/requirements.rs	Tue May 10 20:30:26 2022 +0100
+++ b/rust/hg-core/src/requirements.rs	Fri Apr 15 22:02:07 2022 +0200
@@ -98,35 +98,35 @@
 
 // Copied from mercurial/requirements.py:
 
-pub(crate) const DIRSTATE_V2_REQUIREMENT: &str = "dirstate-v2";
+pub const DIRSTATE_V2_REQUIREMENT: &str = "dirstate-v2";
 
 /// When narrowing is finalized and no longer subject to format changes,
 /// we should move this to just "narrow" or similar.
 #[allow(unused)]
-pub(crate) const NARROW_REQUIREMENT: &str = "narrowhg-experimental";
+pub 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";
+pub const BOOKMARKS_IN_STORE_REQUIREMENT: &str = "bookmarksinstore";
 
 /// Enables sparse working directory usage
 #[allow(unused)]
-pub(crate) const SPARSE_REQUIREMENT: &str = "exp-sparse";
+pub const SPARSE_REQUIREMENT: &str = "exp-sparse";
 
 /// Enables the internal phase which is used to hide changesets instead
 /// of stripping them
 #[allow(unused)]
-pub(crate) const INTERNAL_PHASE_REQUIREMENT: &str = "internal-phase";
+pub const INTERNAL_PHASE_REQUIREMENT: &str = "internal-phase";
 
 /// Stores manifest in Tree structure
 #[allow(unused)]
-pub(crate) const TREEMANIFEST_REQUIREMENT: &str = "treemanifest";
+pub const TREEMANIFEST_REQUIREMENT: &str = "treemanifest";
 
 /// Increment the sub-version when the revlog v2 format changes to lock out old
 /// clients.
 #[allow(unused)]
-pub(crate) const REVLOGV2_REQUIREMENT: &str = "exp-revlogv2.1";
+pub const REVLOGV2_REQUIREMENT: &str = "exp-revlogv2.1";
 
 /// A repository with the sparserevlog feature will have delta chains that
 /// can spread over a larger span. Sparse reading cuts these large spans into
@@ -137,32 +137,32 @@
 /// chain. This is why once a repository has enabled sparse-read, it becomes
 /// required.
 #[allow(unused)]
-pub(crate) const SPARSEREVLOG_REQUIREMENT: &str = "sparserevlog";
+pub const SPARSEREVLOG_REQUIREMENT: &str = "sparserevlog";
 
 /// A repository with the the copies-sidedata-changeset requirement will store
 /// copies related information in changeset's sidedata.
 #[allow(unused)]
-pub(crate) const COPIESSDC_REQUIREMENT: &str = "exp-copies-sidedata-changeset";
+pub const COPIESSDC_REQUIREMENT: &str = "exp-copies-sidedata-changeset";
 
 /// The repository use persistent nodemap for the changelog and the manifest.
 #[allow(unused)]
-pub(crate) const NODEMAP_REQUIREMENT: &str = "persistent-nodemap";
+pub const NODEMAP_REQUIREMENT: &str = "persistent-nodemap";
 
 /// Denotes that the current repository is a share
 #[allow(unused)]
-pub(crate) const SHARED_REQUIREMENT: &str = "shared";
+pub const SHARED_REQUIREMENT: &str = "shared";
 
 /// Denotes that current repository is a share and the shared source path is
 /// relative to the current repository root path
 #[allow(unused)]
-pub(crate) const RELATIVE_SHARED_REQUIREMENT: &str = "relshared";
+pub const RELATIVE_SHARED_REQUIREMENT: &str = "relshared";
 
 /// A repository with share implemented safely. The repository has different
 /// store and working copy requirements i.e. both `.hg/requires` and
 /// `.hg/store/requires` are present.
 #[allow(unused)]
-pub(crate) const SHARESAFE_REQUIREMENT: &str = "share-safe";
+pub const SHARESAFE_REQUIREMENT: &str = "share-safe";
 
 /// A repository that use zstd compression inside its revlog
 #[allow(unused)]
-pub(crate) const REVLOG_COMPRESSION_ZSTD: &str = "revlog-compression-zstd";
+pub const REVLOG_COMPRESSION_ZSTD: &str = "revlog-compression-zstd";