Patchwork [3,of,3,STABLE] tests: move a multi-statement debuglocks hook into a shell script for Windows

login
register
mail settings
Submitter Matt Harbison
Date Nov. 17, 2014, 5:05 a.m.
Message ID <a8351fc68fdbbea679db.1416200745@Envy>
Download mbox | patch
Permalink /patch/6769/
State Accepted
Commit 7dd1870120b247915aa2d73869392f25c20b81cd
Headers show

Comments

Matt Harbison - Nov. 17, 2014, 5:05 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1416193437 18000
#      Sun Nov 16 22:03:57 2014 -0500
# Branch stable
# Node ID a8351fc68fdbbea679db54a11d958026bfa7d1a5
# Parent  7c253c23de3baff407c0093850f735374fa3aef1
tests: move a multi-statement debuglocks hook into a shell script for Windows

Before this patch, a part of "test-push-hook-lock.t" fails unexpectedly on
Windows environment, because semicolon (";") isn't recognized as the command
separator by "cmd.exe".  This is fixed the same way as a similar issue in
7c253c23de3b.
Pierre-Yves David - Nov. 18, 2014, 6:38 a.m.
On 11/17/2014 05:05 AM, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1416193437 18000
> #      Sun Nov 16 22:03:57 2014 -0500
> # Branch stable
> # Node ID a8351fc68fdbbea679db54a11d958026bfa7d1a5
> # Parent  7c253c23de3baff407c0093850f735374fa3aef1
> tests: move a multi-statement debuglocks hook into a shell script for Windows

This series looks good to me, but I would like someone who have some 
windows notion to express something.
Matt Mackall - Nov. 18, 2014, 6:25 p.m.
On Mon, 2014-11-17 at 00:05 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1416193437 18000
> #      Sun Nov 16 22:03:57 2014 -0500
> # Branch stable
> # Node ID a8351fc68fdbbea679db54a11d958026bfa7d1a5
> # Parent  7c253c23de3baff407c0093850f735374fa3aef1
> tests: move a multi-statement debuglocks hook into a shell script for Windows

I've queued these for default, thanks. There's no end-user upside to
tweaking the test suite, so we'd prefer not to have the churn on the
stable branch.

Patch

diff --git a/tests/test-push-hook-lock.t b/tests/test-push-hook-lock.t
--- a/tests/test-push-hook-lock.t
+++ b/tests/test-push-hook-lock.t
@@ -15,8 +15,12 @@ 
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
+  $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh
+  > hg debuglocks
+  > true
+  > EOF
   $ echo '[hooks]' >> 2/.hg/hgrc
-  $ echo 'pretxnchangegroup.a = hg debuglocks; true' >> 2/.hg/hgrc
+  $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc
   $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
 
   $ echo bar >> 3/foo