[Request] [+ ] D12479: tests-racy-mutation: pass the editor through config instead of env variable

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Apr 6 17:21:23 UTC 2022


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  tests/test-racy-mutations.t

CHANGE DETAILS

diff --git a/tests/test-racy-mutations.t b/tests/test-racy-mutations.t
--- a/tests/test-racy-mutations.t
+++ b/tests/test-racy-mutations.t
@@ -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



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20220406/b120c840/attachment.html>


More information about the Mercurial-patches mailing list