changeset 33173:4b0da963586d

test-rebase-interruptions: stabilize for Windows External hooks end up launching cmd.exe, which knows nothing about $VAR syntax. For some reason, I thought that Mercurial would substitute in the value, in order to paper over the platform difference. But I can't find that in the documentation, and there's at least one other use of this pattern [1]. [1] https://www.mercurial-scm.org/repo/hg/file/tip/tests/test-histedit-fold.t#l477
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 01 Jul 2017 15:13:09 -0400
parents 0830c841fc7f
children f4f52bb362e6
files tests/test-rebase-interruptions.t
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-interruptions.t	Fri Jun 30 23:15:09 2017 -0700
+++ b/tests/test-rebase-interruptions.t	Sat Jul 01 15:13:09 2017 -0400
@@ -333,7 +333,12 @@
 
   $ cp -R a3 hook-pretxncommit
   $ cd hook-pretxncommit
-  $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary:     C"'
+#if windows
+  $ NODE="%HG_NODE%"
+#else
+  $ NODE="\$HG_NODE"
+#endif
+  $ hg rebase --source 2 --dest 5 --tool internal:other --config "hooks.pretxncommit=hg log -r $NODE | grep \"summary:     C\""
   rebasing 2:965c486023db "C"
   summary:     C
   rebasing 6:a0b2430ebfb8 "F" (tip)