bos@611: bos@564: $ cat .hg/hgrc bos@144: [hooks] bos@150: pretxncommit.whitespace = .hg/check_whitespace.py bos@564: $ echo 'a ' >> a bos@564: $ hg commit -A -m 'add new line with trailing whitespace' bos@144: a, line 2: trailing whitespace added bos@144: commit message saved to .hg/commit.save bos@144: transaction abort! bos@144: rollback completed bos@273: abort: pretxncommit.whitespace hook exited with status 1 bos@564: $ sed -i 's, *$,,' a bos@564: $ hg commit -A -m 'trimmed trailing whitespace' bos@165: a, line 2: trailing whitespace added bos@144: commit message saved to .hg/commit.save bos@144: transaction abort! bos@144: rollback completed bos@273: abort: pretxncommit.whitespace hook exited with status 1 bos@564: bos@611: