changeset 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 8f4c9ae918af
children 08a4467f4891
files en/examples/hook.ws en/examples/hook.ws.better.out
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/en/examples/hook.ws	Mon Mar 26 22:28:25 2007 -0700
+++ b/en/examples/hook.ws	Mon Mar 26 22:45:48 2007 -0700
@@ -24,7 +24,7 @@
 cat .hg/hgrc
 echo 'a ' >> a
 hg commit -A -m 'add new line with trailing whitespace'
-perl -pi -e 's,\s+$,,' a
+sed -i 's, *$,,' a
 hg commit -A -m 'trimmed trailing whitespace'
 
 #$ name:
--- a/en/examples/hook.ws.better.out	Mon Mar 26 22:28:25 2007 -0700
+++ b/en/examples/hook.ws.better.out	Mon Mar 26 22:45:48 2007 -0700
@@ -8,9 +8,9 @@
 abort: pretxncommit.whitespace hook exited with status 1
 transaction abort!
 rollback completed
-$ \textbf{perl -pi -e 's,\textbackslash{}s+$,,' a}
+$ \textbf{sed -i 's, *$,,' a}
 $ \textbf{hg commit -A -m 'trimmed trailing whitespace'}
-a, line 1: trailing whitespace added
+a, line 2: trailing whitespace added
 commit message saved to .hg/commit.save
 abort: pretxncommit.whitespace hook exited with status 1
 transaction abort!