From patchwork Sat Jul 1 19:16:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: test-rebase-interruptions: stabilize for Windows From: Matt Harbison X-Patchwork-Id: 21861 Message-Id: <61ed2cc98fd17c50c7ad.1498936605@Envy> To: mercurial-devel@mercurial-scm.org Date: Sat, 01 Jul 2017 15:16:45 -0400 # HG changeset patch # User Matt Harbison # Date 1498936389 14400 # Sat Jul 01 15:13:09 2017 -0400 # Node ID 61ed2cc98fd17c50c7adf634d777d946781a9fc1 # Parent 77e666f943a6c246d7fc970a8a36cd8b2023e03b 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 diff --git a/tests/test-rebase-interruptions.t b/tests/test-rebase-interruptions.t --- a/tests/test-rebase-interruptions.t +++ b/tests/test-rebase-interruptions.t @@ -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)