[Commented On] D10139: rhg: Add support for the HGRCSKIPREPO environment variable
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Mon Mar 15 13:12:26 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 26345.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10139?vs=26299&id=26345
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10139/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10139
AFFECTED FILES
rust/hg-core/src/config/config.rs
rust/hg-core/src/repo.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/repo.rs b/rust/hg-core/src/repo.rs
--- a/rust/hg-core/src/repo.rs
+++ b/rust/hg-core/src/repo.rs
@@ -169,7 +169,11 @@
reqs.extend(requirements::load(Vfs { base: &store_path })?);
}
- let repo_config = config.combine_with_repo(&repo_config_files)?;
+ let repo_config = if std::env::var_os("HGRCSKIPREPO").is_none() {
+ config.combine_with_repo(&repo_config_files)?
+ } else {
+ config.clone()
+ };
let repo = Self {
requirements: reqs,
diff --git a/rust/hg-core/src/config/config.rs b/rust/hg-core/src/config/config.rs
--- a/rust/hg-core/src/config/config.rs
+++ b/rust/hg-core/src/config/config.rs
@@ -24,6 +24,7 @@
/// Holds the config values for the current repository
/// TODO update this docstring once we support more sources
+#[derive(Clone)]
pub struct Config {
layers: Vec<layer::ConfigLayer>,
}
To: SimonSapin, #hg-reviewers, marmoute, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210315/b48c1504/attachment-0002.html>
More information about the Mercurial-patches
mailing list