diff tests/test-rebase-rename @ 11198:b345b1cc124f

rebase: use helpers.sh in tests
author Matt Mackall <mpm@selenic.com>
date Wed, 19 May 2010 20:20:12 -0500
parents b969611064ae
children 2313dc4d9817
line wrap: on
line diff
--- a/tests/test-rebase-rename	Wed May 19 19:46:39 2010 -0500
+++ b/tests/test-rebase-rename	Wed May 19 20:20:12 2010 -0500
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+source $TESTDIR/helpers.sh
+
 echo "[extensions]" >> $HGRCPATH
 echo "rebase=" >> $HGRCPATH
 echo "[diff]" >> $HGRCPATH
@@ -7,12 +9,6 @@
 
 BASE=`pwd`
 
-cleanoutput () {
-    sed -e 's/\(Rebase status stored to\).*/\1/'  \
-        -e 's/\(Rebase status restored from\).*/\1/' \
-        -e 's/\(saving bundle to \).*/\1/'
-}
-
 hg init repo1
 cd repo1
 echo "a">a
@@ -28,7 +24,7 @@
 hg log -p -r tip --template '{rev}:{desc}\n'
 
 echo '% Rebase the revision containing the rename'
-hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput
+hg rebase -s 2 -d 1 --quiet | cleanrebase
 
 echo
 echo '% Rename is not lost'
@@ -51,7 +47,7 @@
 hg log -p -r tip --template '{rev}:{desc}\n'
 
 echo '% Rebase the revision containing the copy'
-hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput
+hg rebase -s 2 -d 1 --quiet | cleanrebase
 
 echo
 echo '% Copy is not lost'