# HG changeset patch # User Matt Harbison # Date 1728340001 14400 # Node ID d8b981968a55b4c2e16aa334f95299bd3692a418 # Parent 92a708af7b05abcfb46c0e1891b1a77e632b1175 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. diff -r 92a708af7b05 -r d8b981968a55 tests/test-clonebundles.t --- 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