changeset 48384:b7fde9237c92

rhg: Enable `rhg status` in most tests 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. Differential Revision: https://phab.mercurial-scm.org/D11756
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 09 Nov 2021 19:55:46 +0100
parents 8b927b33310a
children 5b9865032533
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
diffstat 20 files changed, 73 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/config/config.rs	Fri Nov 19 11:20:10 2021 +0100
+++ b/rust/hg-core/src/config/config.rs	Tue Nov 09 19:55:46 2021 +0100
@@ -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() {
--- a/tests/run-tests.py	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/run-tests.py	Tue Nov 09 19:55:46 2021 +0100
@@ -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)
--- a/tests/test-basic.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-basic.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-conflict.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-conflict.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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.
--- a/tests/test-dirstate.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-dirstate.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-encode.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-encode.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-execute-bit.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-execute-bit.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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'
--- a/tests/test-hgignore.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-hgignore.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
 
--- a/tests/test-import.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-import.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-issue6528.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-issue6528.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
 =====
 
--- a/tests/test-merge-exec.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-merge-exec.t	Tue Nov 09 19:55:46 2021 +0100
@@ -4,6 +4,9 @@
 
 #require execbit
 
+TODO: fix rhg bugs that make this test fail when status is enabled
+  $ unset RHG_STATUS
+
 
 Initial setup
 ==============
--- a/tests/test-merge-types.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-merge-types.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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:
--- a/tests/test-permissions.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-permissions.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
 
--- a/tests/test-rename-dir-merge.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-rename-dir-merge.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
 
--- a/tests/test-status-color.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-status-color.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-status-terse.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-status-terse.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-status.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-status.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-subrepo-deep-nested-change.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-subrepo-deep-nested-change.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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:
--- a/tests/test-subrepo-missing.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-subrepo-missing.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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
--- a/tests/test-symlinks.t	Fri Nov 19 11:20:10 2021 +0100
+++ b/tests/test-symlinks.t	Tue Nov 09 19:55:46 2021 +0100
@@ -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;