view en/examples/hook.ws.better.out @ 165:06d18465df03

Make an example run more predictably.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 26 Mar 2007 22:45:48 -0700
parents 8cf40d4d9377
children 00f69e8825c5
line wrap: on
line source

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