Mercurial > hgbook
view es/examples/hook.ws @ 449:74224b4f6928
this file was a symlink; this was intended to keep track of the file on any
change that might appear on the original version of the book. I removed it and
instead created a copy, because some of the modifications needed for the
translation (the traduction of a couple of commands defined there) would have
affected the english version. And we don't want that ;)
author | jerojasro@localhost |
---|---|
date | Sun, 19 Oct 2008 23:53:39 -0500 |
parents | 04c08ad7e92e |
children |
line wrap: on
line source
#!/bin/bash hg init a cd a echo '[hooks]' > .hg/hgrc echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc #$ name: simple cat .hg/hgrc echo 'a ' > a hg commit -A -m 'test with trailing whitespace' echo 'a' > a hg commit -A -m 'drop trailing whitespace and try again' #$ name: echo '[hooks]' > .hg/hgrc echo "pretxncommit.whitespace = .hg/check_whitespace.py" >> .hg/hgrc cp $EXAMPLE_DIR/data/check_whitespace.py .hg #$ name: better cat .hg/hgrc echo 'a ' >> a hg commit -A -m 'add new line with trailing whitespace' sed -i 's, *$,,' a hg commit -A -m 'trimmed trailing whitespace' #$ name: exit 0