tests-racy-mutation: pass the editor through config instead of env variable stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 06 Apr 2022 18:44:21 +0200
branchstable
changeset 49046 dd384ad01d88
parent 49008 dd98bd0b6501
child 49047 c827bb7b5806
tests-racy-mutation: pass the editor through config instead of env variable On Windows msys seems to do awful mangling of the environment variable content that confuses everything to the death. Going through the config works fine, so we do that instead. Differential Revision: https://phab.mercurial-scm.org/D12479
tests/test-racy-mutations.t
--- a/tests/test-racy-mutations.t	Tue Apr 05 17:19:29 2022 +0200
+++ b/tests/test-racy-mutations.t	Wed Apr 06 18:44:21 2022 +0200
@@ -38,14 +38,24 @@
   > EOF
 #endif
 
+  $ cat >> .hg/hgrc << EOF
+  > [ui]
+  > editor=sh $TESTTMP/waitlock_editor.sh
+  > EOF
+
   $ echo foo > foo
-  $ (WAITLOCK_ANNOUNCE="${EDITOR_STARTED}" \
+  $ (unset HGEDITOR;
+  >      WAITLOCK_ANNOUNCE="${EDITOR_STARTED}" \
   >      WAITLOCK_FILE="${MISCHIEF_MANAGED}" \
-  >           HGEDITOR="sh $TESTTMP/waitlock_editor.sh" \
   >           hg commit -qAm 'r1 (foo)' --edit foo > .foo_commit_out 2>&1 ; touch "${JOBS_FINISHED}") &
 
 Wait for the "editor" to actually start
-  $ WAITLOCK_FILE="${EDITOR_STARTED}" sh "$TESTTMP/waitlock_editor.sh"
+  $ sh "$RUNTESTDIR/testlib/wait-on-file" 5 "${EDITOR_STARTED}"
+
+  $ cat >> .hg/hgrc << EOF
+  > [ui]
+  > editor=
+  > EOF
 
 Break the locks, and make another commit.
   $ hg debuglocks -LW