hgbook
diff fr/examples/ch09/hook.ws @ 1020:53dfddc566d8
French: corrections in xml tags
author | André Sintzoff <andre.sintzoff@gmail.com> |
---|---|
date | Tue Dec 01 13:40:01 2009 +0100 (2009-12-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/fr/examples/ch09/hook.ws Tue Dec 01 13:40:01 2009 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +#!/bin/bash 1.5 + 1.6 +hg init a 1.7 +cd a 1.8 +echo '[hooks]' > .hg/hgrc 1.9 +echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc 1.10 + 1.11 +#$ name: simple 1.12 + 1.13 +cat .hg/hgrc 1.14 +echo 'a ' > a 1.15 +hg commit -A -m 'test with trailing whitespace' 1.16 +echo 'a' > a 1.17 +hg commit -A -m 'drop trailing whitespace and try again' 1.18 + 1.19 +#$ name: 1.20 + 1.21 +echo '[hooks]' > .hg/hgrc 1.22 +echo "pretxncommit.whitespace = .hg/check_whitespace.py" >> .hg/hgrc 1.23 +cp $EXAMPLE_DIR/ch09/check_whitespace.py.lst .hg/check_whitespace.py 1.24 +chmod +x .hg/check_whitespace.py 1.25 + 1.26 +#$ name: better 1.27 + 1.28 +cat .hg/hgrc 1.29 +echo 'a ' >> a 1.30 +hg commit -A -m 'add new line with trailing whitespace' 1.31 +sed -i 's, *$,,' a 1.32 +hg commit -A -m 'trimmed trailing whitespace' 1.33 + 1.34 +#$ name: 1.35 +exit 0