tests: stabilize `test-clonebundles.t` on Windows
The `remote: {foo,bar}` lines were different because `echo` in MSYS uses `\r\n`.
I couldn't make it work with the previous echoing of individual lines, changing
the internal `echo` to `printf "foo\n"`, because that output as "foon". This
works on Linux and Windows, so I'm not thinking too hard about it.
--- a/tests/test-clonebundles.t Mon Oct 07 17:26:31 2024 -0400
+++ b/tests/test-clonebundles.t Mon Oct 07 18:26:41 2024 -0400
@@ -290,8 +290,10 @@
Hooks work with inline bundle
$ cp server/.hg/hgrc server/.hg/hgrc-beforeinlinehooks
- $ echo "[hooks]" >> server/.hg/hgrc
- $ echo "pretransmit-inline-clone-bundle=echo foo" >> server/.hg/hgrc
+ $ cat >> server/.hg/hgrc <<-EOF
+ > [hooks]
+ > pretransmit-inline-clone-bundle=sh -c 'printf "foo\n"'
+ > EOF
$ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook
applying clone bundle from peer-bundle-cache://full.hg
remote: foo
@@ -307,8 +309,10 @@
Hooks can make an inline bundle fail
$ cp server/.hg/hgrc-beforeinlinehooks server/.hg/hgrc
- $ echo "[hooks]" >> server/.hg/hgrc
- $ echo "pretransmit-inline-clone-bundle=echo bar && false" >> server/.hg/hgrc
+ $ cat >> server/.hg/hgrc <<-EOF
+ > [hooks]
+ > pretransmit-inline-clone-bundle=sh -c 'printf "bar\n"' && false
+ > EOF
$ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook-fail
applying clone bundle from peer-bundle-cache://full.hg
remote: bar