Mercurial > hgbook
view en/examples/hook.ws @ 614:aa01d35ac59f
replaced several instances of "los tags" with "las etiquetas", corrected typos and so on
author | Javier Rojas <jerojasro@devnull.li> |
---|---|
date | Sun, 18 Jan 2009 21:01:13 -0500 |
parents | e67251ac336f |
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