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

Augie Fackler raf at durin42.com
Mon Apr 20 14:22:52 CDT 2015


On Apr 20, 2015, at 2:38 PM, Matt Harbison <mharbison at attotech.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at 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 at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150420/82b18a51/attachment.pgp>


More information about the Mercurial-devel mailing list