changeset 46613:f64b6953db70

rhg: Bug fix: with share-safe, always read store requirements That is, the `store/requires` file, regardless of whether the repository is a shared. Differential Revision: https://phab.mercurial-scm.org/D10078
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 25 Feb 2021 23:14:35 +0100
parents 80f7567ac9bb
children a069639783a0
files rust/hg-core/src/repo.rs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/repo.rs	Mon Jan 11 12:17:16 2021 +0100
+++ b/rust/hg-core/src/repo.rs	Thu Feb 25 23:14:35 2021 +0100
@@ -116,9 +116,6 @@
         let store_path;
         if !shared {
             store_path = dot_hg.join("store");
-            if share_safe {
-                reqs.extend(requirements::load(Vfs { base: &store_path })?);
-            }
         } else {
             let bytes = hg_vfs.read("sharedpath")?;
             let mut shared_path = get_path_from_bytes(&bytes).to_owned();
@@ -166,6 +163,9 @@
                 repo_config_files.insert(0, shared_path.join("hgrc"))
             }
         }
+        if share_safe {
+            reqs.extend(requirements::load(Vfs { base: &store_path })?);
+        }
 
         let repo_config = config.combine_with_repo(&repo_config_files)?;