hgbook

diff en/examples/hook.ws @ 68:c574ce277a2b

Mostly random attempt to see if fiddling with the child will help the parent.
Motivated by problems people are having on Debian sid and FreeBSD.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon Aug 07 15:45:08 2006 -0700 (2006-08-07)
parents 6f37e6a7d8cd
children ec1f144968de
line diff
     1.1 --- a/en/examples/hook.ws	Sun Jul 23 23:38:41 2006 -0700
     1.2 +++ b/en/examples/hook.ws	Mon Aug 07 15:45:08 2006 -0700
     1.3 @@ -1,7 +1,5 @@
     1.4  #!/bin/bash
     1.5  
     1.6 -cp $EXAMPLE_DIR/data/check_whitespace.py .
     1.7 -
     1.8  hg init a
     1.9  cd a
    1.10  echo '[hooks]' > .hg/hgrc
    1.11 @@ -12,3 +10,19 @@
    1.12  cat .hg/hgrc
    1.13  echo 'a ' > a
    1.14  hg commit -A -m 'test with trailing whitespace'
    1.15 +echo 'a' > a
    1.16 +hg commit -A -m 'drop trailing whitespace and try again'
    1.17 +
    1.18 +#$ name:
    1.19 +
    1.20 +echo '[hooks]' > .hg/hgrc
    1.21 +echo "pretxncommit.whitespace = check_whitespace.py" >> .hg/hgrc
    1.22 +cp $EXAMPLE_DIR/data/check_whitespace.py .
    1.23 +
    1.24 +#$ name: better
    1.25 +
    1.26 +cat .hg/hgrc
    1.27 +echo 'a ' >> a
    1.28 +hg commit -A -m 'add new line with trailing whitespace'
    1.29 +perl -pi -e 's,\s+$,,' a
    1.30 +hg commit -A -m 'trimmed trailing whitespace'