[Updated] D12162: rhg: enable `rhg status` by default, without config or env opt-in

SimonSapin phabricator at mercurial-scm.org
Mon Feb 14 10:26:59 UTC 2022


Closed by commit rHG29eb80d190b2: rhg: enable `rhg status` by default, without config or env opt-in (authored by SimonSapin).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12162?vs=32147&id=32161

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12162/new/

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

AFFECTED FILES
  rust/hg-core/src/config/config.rs
  rust/rhg/src/commands/status.rs
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3228,7 +3228,6 @@
             # output.
             osenvironb[b'RHG_ON_UNSUPPORTED'] = b'fallback'
             osenvironb[b'RHG_FALLBACK_EXECUTABLE'] = real_hg
-            osenvironb[b'RHG_STATUS'] = b'1'
         else:
             # drop flag for hghave
             osenvironb.pop(b'RHG_INSTALLED_AS_HG', None)
diff --git a/rust/rhg/src/commands/status.rs b/rust/rhg/src/commands/status.rs
--- a/rust/rhg/src/commands/status.rs
+++ b/rust/rhg/src/commands/status.rs
@@ -149,15 +149,6 @@
 }
 
 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
-    let status_enabled_default = false;
-    let status_enabled = invocation.config.get_option(b"rhg", b"status")?;
-    if !status_enabled.unwrap_or(status_enabled_default) {
-        return Err(CommandError::unsupported(
-            "status is experimental in rhg (enable it with 'rhg.status = true' \
-            or enable fallback with 'rhg.on-unsupported = fallback')"
-        ));
-    }
-
     // TODO: lift these limitations
     if invocation.config.get_bool(b"ui", b"tweakdefaults")? {
         return Err(CommandError::unsupported(
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
@@ -119,7 +119,6 @@
             b"rhg",
             b"fallback-executable",
         );
-        config.add_for_environment_variable("RHG_STATUS", b"rhg", b"status");
 
         // HGRCPATH replaces user config
         if opt_rc_path.is_none() {



To: SimonSapin, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220214/d7774980/attachment-0002.html>


More information about the Mercurial-patches mailing list