Patchwork [2,of,3] tests: fix another multi-statement hook for Windows

login
register
mail settings
Submitter Matt Harbison
Date Nov. 21, 2014, 4:16 a.m.
Message ID <9973255d082986ceb894.1416543395@Envy>
Download mbox | patch
Permalink /patch/6817/
State Accepted
Headers show

Comments

Matt Harbison - Nov. 21, 2014, 4:16 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1416532054 18000
#      Thu Nov 20 20:07:34 2014 -0500
# Node ID 9973255d082986ceb894983077e39edd1bd0b9b8
# Parent  c32796f1605539096eed2603e0c2dca44f99fb04
tests: fix another multi-statement hook for Windows

The double quotes are necessary, otherwise it tries to pipe into a program named
'short'.  An '&' could serve as a command separator on Windows instead of ';',
but I don't see any obvious way to swap these depending on the platform.  In
this case though, there really wasn't a need for multiple statements.

Patch

diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -21,8 +21,8 @@ 
   > publish=False
   > [hooks]
   > changegroup = sh -c  "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup"
-  > b2x-pretransactionclose.tip = printf 'pre-close-tip:'; hg log -r tip -T '{node|short} {phase} {bookmarks}\n'
-  > b2x-transactionclose.tip = printf 'postclose-tip:'; hg log -r tip -T '{node|short} {phase} {bookmarks}\n'
+  > b2x-pretransactionclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
+  > b2x-transactionclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
   > b2x-transactionclose.env = sh -c  "HG_LOCAL= python \"$TESTDIR/printenv.py\" b2x-transactionclose"
   > EOF