Patchwork [STABLE] test-hook.t: don't directly use redirect to /dev/null in hook for Windows

login
register
mail settings
Submitter Matt Harbison
Date April 20, 2015, 6:38 p.m.
Message ID <e8dac25f1ac6e25ecce1.1429555087@MATT7H-PC.attotech.com>
Download mbox | patch
Permalink /patch/8751/
State Accepted
Commit abfdcb20cc79b9f49c8ac203e07cc7f88924b499
Headers show

Comments

Matt Harbison - April 20, 2015, 6:38 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1429551790 14400
#      Mon Apr 20 13:43:10 2015 -0400
# Branch stable
# Node ID e8dac25f1ac6e25ecce113d322f28b3e23d00090
# Parent  8678b1eafbcfbd328a48bd24b9e1b5761d06520d
test-hook.t: don't directly use redirect to /dev/null in hook for Windows

This goes with 57f1dbc99631.  External hooks are run in cmd.exe, which doesn't
know about /dev/null, but sh can handle it.
Augie Fackler - April 20, 2015, 7:22 p.m.
On Apr 20, 2015, at 2:38 PM, Matt Harbison <mharbison@attotech.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1429551790 14400
> #      Mon Apr 20 13:43:10 2015 -0400
> # Branch stable
> # Node ID e8dac25f1ac6e25ecce113d322f28b3e23d00090
> # Parent  8678b1eafbcfbd328a48bd24b9e1b5761d06520d
> test-hook.t: don't directly use redirect to /dev/null in hook for Windows

queued, thanks

> 
> This goes with 57f1dbc99631.  External hooks are run in cmd.exe, which doesn't
> know about /dev/null, but sh can handle it.
> 
> diff --git a/tests/test-hook.t b/tests/test-hook.t
> --- a/tests/test-hook.t
> +++ b/tests/test-hook.t
> @@ -17,7 +17,7 @@ commit hooks can see env vars
>> pretxnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" pretxnclose"
>> txnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnclose"
>> txnabort = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnabort"
> -  > txnclose.checklock = hg debuglock > /dev/null
> +  > txnclose.checklock = sh -c "hg debuglock > /dev/null"
>> EOF
>   $ echo a > a
>   $ hg add a
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -17,7 +17,7 @@  commit hooks can see env vars
   > pretxnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" pretxnclose"
   > txnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnclose"
   > txnabort = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnabort"
-  > txnclose.checklock = hg debuglock > /dev/null
+  > txnclose.checklock = sh -c "hg debuglock > /dev/null"
   > EOF
   $ echo a > a
   $ hg add a