[Updated] D10762: tests: fix test-transaction-safety.t on Windows

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sun May 23 22:07:18 UTC 2021


Closed by commit rHGb1ce93dcdf3c: tests: fix test-transaction-safety.t on Windows (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10762?vs=28165&id=28190

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

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

AFFECTED FILES
  tests/test-transaction-safety.t

CHANGE DETAILS

diff --git a/tests/test-transaction-safety.t b/tests/test-transaction-safety.t
--- a/tests/test-transaction-safety.t
+++ b/tests/test-transaction-safety.t
@@ -54,17 +54,15 @@
   $ export HG_TEST_FILE_EXT_DONE
   $ cat << EOF > script/external.sh
   > #!/bin/sh
-  > $RUNTESTDIR/testlib/wait-on-file 5 $HG_TEST_FILE_EXT_UNLOCK $HG_TEST_FILE_EXT_WAITING
-  > hg log --rev 'tip' -T 'external: {rev} {desc}\n' > $TESTTMP/output/external.out
-  > touch $HG_TEST_FILE_EXT_DONE
+  > "$RUNTESTDIR/testlib/wait-on-file" 5 "$HG_TEST_FILE_EXT_UNLOCK" "$HG_TEST_FILE_EXT_WAITING"
+  > hg log --rev 'tip' -T 'external: {rev} {desc}\n' > "$TESTTMP/output/external.out"
+  > touch "$HG_TEST_FILE_EXT_DONE"
   > EOF
-  $ chmod +x script/external.sh
   $ cat << EOF > script/internal.sh
   > #!/bin/sh
-  > hg log --rev 'tip' -T 'internal: {rev} {desc}\n' > $TESTTMP/output/internal.out
-  > $RUNTESTDIR/testlib/wait-on-file 5 $HG_TEST_FILE_EXT_DONE $HG_TEST_FILE_EXT_UNLOCK
+  > hg log --rev 'tip' -T 'internal: {rev} {desc}\n' > "$TESTTMP/output/internal.out"
+  > "$RUNTESTDIR/testlib/wait-on-file" 5 "$HG_TEST_FILE_EXT_DONE" "$HG_TEST_FILE_EXT_UNLOCK"
   > EOF
-  $ chmod +x script/internal.sh
 
 
 Automated commands:
@@ -74,7 +72,7 @@
   > rm -f $TESTTMP/output/*
   > hg log --rev 'tip' -T 'pre-commit: {rev} {desc}\n'
   > echo x >> a
-  > $TESTTMP/script/external.sh & hg commit -m "$1"
+  > sh $TESTTMP/script/external.sh & hg commit -m "$1"
   > cat $TESTTMP/output/external.out
   > cat $TESTTMP/output/internal.out
   > hg log --rev 'tip' -T 'post-tr:  {rev} {desc}\n'
@@ -86,7 +84,7 @@
   > rm -f $TESTTMP/output/*
   > hg log --rev 'tip' -T 'pre-commit: {rev} {desc}\n'
   > echo x >> a
-  > $TESTTMP/script/external.sh & hg pull ../other-repo/ --rev "$1" --force --quiet
+  > sh $TESTTMP/script/external.sh & hg pull ../other-repo/ --rev "$1" --force --quiet
   > cat $TESTTMP/output/external.out
   > cat $TESTTMP/output/internal.out
   > hg log --rev 'tip' -T 'post-tr:  {rev} {desc}\n'
@@ -122,7 +120,7 @@
   > [extensions]
   > small_inline=$TESTTMP/ext/small_inline.py
   > [hooks]
-  > pretxnclose = $TESTTMP/script/internal.sh
+  > pretxnclose = sh $TESTTMP/script/internal.sh
   > EOF
 
 check this is true for the initial commit (inline → inline)



To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210523/31f72345/attachment-0002.html>


More information about the Mercurial-patches mailing list