Mercurial > hg-stable
changeset 52017:d8b981968a55
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 07 Oct 2024 18:26:41 -0400 |
parents | 92a708af7b05 |
children | df887ca0d891 |
files | tests/test-clonebundles.t |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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