Patchwork D11756: rhg: Enable `rhg status` in most tests

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2021, 11:11 a.m.
Message ID <differential-rev-PHID-DREV-oxsottl4hgq357ymqahe-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50081/
State Superseded
Headers show

Comments

phabricator - Nov. 15, 2021, 11:11 a.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This subcommand is disabled by default because of bugs that make some test fail.
  Enable it in the rest of the tests in order to avoid regressing them.
  
  As with `RHG_ON_UNSUPPORTED`, an environment variable is used instead of
  a configuration file and `HGRCPATH` because some tests override `HGRCPATH`.
  
  Running `unset RHG_STATUS` at the start of a test restores the default of
  `rhg status` being disabled. Hopefully it can be increasingly removed
  from test files as bugs are fixed.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/config/config.rs
  tests/run-tests.py
  tests/test-basic.t
  tests/test-conflict.t
  tests/test-dirstate.t
  tests/test-encode.t
  tests/test-execute-bit.t
  tests/test-hgignore.t
  tests/test-import.t
  tests/test-issue6528.t
  tests/test-merge-exec.t
  tests/test-merge-types.t
  tests/test-permissions.t
  tests/test-rename-dir-merge.t
  tests/test-status-color.t
  tests/test-status-terse.t
  tests/test-status.t
  tests/test-subrepo-deep-nested-change.t
  tests/test-subrepo-missing.t
  tests/test-symlinks.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-symlinks.t b/tests/test-symlinks.t
--- a/tests/test-symlinks.t
+++ b/tests/test-symlinks.t
@@ -11,6 +11,10 @@ 
   > EOF
 #endif
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
 == tests added in 0.7 ==
 
   $ hg init test-symlinks-0.7; cd test-symlinks-0.7;
diff --git a/tests/test-subrepo-missing.t b/tests/test-subrepo-missing.t
--- a/tests/test-subrepo-missing.t
+++ b/tests/test-subrepo-missing.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init repo
   $ cd repo
   $ hg init subrepo
diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ cat >> $HGRCPATH <<EOF
   > [extdiff]
   > # for portability:
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -9,6 +9,10 @@ 
   > EOF
 #endif
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init repo1
   $ cd repo1
   $ mkdir a b a/1 b/1 b/2
diff --git a/tests/test-status-terse.t b/tests/test-status-terse.t
--- a/tests/test-status-terse.t
+++ b/tests/test-status-terse.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ mkdir folder
   $ cd folder
   $ hg init
diff --git a/tests/test-status-color.t b/tests/test-status-color.t
--- a/tests/test-status-color.t
+++ b/tests/test-status-color.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ cat <<EOF >> $HGRCPATH
   > [ui]
   > color = always
diff --git a/tests/test-rename-dir-merge.t b/tests/test-rename-dir-merge.t
--- a/tests/test-rename-dir-merge.t
+++ b/tests/test-rename-dir-merge.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init t
   $ cd t
 
diff --git a/tests/test-permissions.t b/tests/test-permissions.t
--- a/tests/test-permissions.t
+++ b/tests/test-permissions.t
@@ -11,6 +11,10 @@ 
   > EOF
 #endif
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init t
   $ cd t
 
diff --git a/tests/test-merge-types.t b/tests/test-merge-types.t
--- a/tests/test-merge-types.t
+++ b/tests/test-merge-types.t
@@ -1,5 +1,9 @@ 
 #require symlink execbit
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ tellmeabout() {
   > if [ -h $1 ]; then
   >     echo $1 is a symlink:
diff --git a/tests/test-merge-exec.t b/tests/test-merge-exec.t
--- a/tests/test-merge-exec.t
+++ b/tests/test-merge-exec.t
@@ -4,6 +4,9 @@ 
 
 #require execbit
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
 
 Initial setup
 ==============
diff --git a/tests/test-issue6528.t b/tests/test-issue6528.t
--- a/tests/test-issue6528.t
+++ b/tests/test-issue6528.t
@@ -2,6 +2,10 @@ 
 Test non-regression on the corruption associated with issue6528
 ===============================================================
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
 Setup
 =====
 
diff --git a/tests/test-import.t b/tests/test-import.t
--- a/tests/test-import.t
+++ b/tests/test-import.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init a
   $ mkdir a/d1
   $ mkdir a/d1/d2
diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -9,6 +9,10 @@ 
   > EOF
 #endif
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init ignorerepo
   $ cd ignorerepo
 
diff --git a/tests/test-execute-bit.t b/tests/test-execute-bit.t
--- a/tests/test-execute-bit.t
+++ b/tests/test-execute-bit.t
@@ -1,5 +1,9 @@ 
 #require execbit
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init
   $ echo a > a
   $ hg ci -Am'not executable'
diff --git a/tests/test-encode.t b/tests/test-encode.t
--- a/tests/test-encode.t
+++ b/tests/test-encode.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
 Test encode/decode filters
 
   $ hg init
diff --git a/tests/test-dirstate.t b/tests/test-dirstate.t
--- a/tests/test-dirstate.t
+++ b/tests/test-dirstate.t
@@ -9,6 +9,10 @@ 
   > EOF
 #endif
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
 ------ Test dirstate._dirs refcounting
 
   $ hg init t
diff --git a/tests/test-conflict.t b/tests/test-conflict.t
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
   $ hg init
   $ cat << EOF > a
   > Small Mathematical Series.
diff --git a/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -1,3 +1,7 @@ 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
+
 Create a repository:
 
 #if no-extraextensions
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3228,6 +3228,7 @@ 
             # 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/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
@@ -114,6 +114,7 @@ 
             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() {