comparison tests/test-rebase-abort @ 11198:b345b1cc124f

rebase: use helpers.sh in tests
author Matt Mackall <mpm@selenic.com>
date Wed, 19 May 2010 20:20:12 -0500
parents 8766fee6f225
children 2313dc4d9817
comparison
equal deleted inserted replaced
11197:4bb4895e1693 11198:b345b1cc124f
1 #!/bin/sh 1 #!/bin/sh
2
3 source $TESTDIR/helpers.sh
2 4
3 echo "[extensions]" >> $HGRCPATH 5 echo "[extensions]" >> $HGRCPATH
4 echo "graphlog=" >> $HGRCPATH 6 echo "graphlog=" >> $HGRCPATH
5 echo "rebase=" >> $HGRCPATH 7 echo "rebase=" >> $HGRCPATH
6
7 cleanoutput () {
8 sed -e 's/\(Rebase status stored to\).*/\1/' \
9 -e 's/\(Rebase status restored from\).*/\1/' \
10 -e 's/\(saving bundle to \).*/\1/'
11 }
12 8
13 hg init a 9 hg init a
14 cd a 10 cd a
15 echo 'c1' >common 11 echo 'c1' >common
16 hg add common 12 hg add common
33 29
34 hg glog --template '{rev}: {desc}\n' 30 hg glog --template '{rev}: {desc}\n'
35 31
36 echo 32 echo
37 echo '% Conflicting rebase' 33 echo '% Conflicting rebase'
38 hg rebase -s 3 -d 2 2>&1 | cleanoutput 34 hg rebase -s 3 -d 2 | cleanrebase
39 35
40 echo 36 echo
41 echo '% Abort' 37 echo '% Abort'
42 hg rebase --abort 2>&1 | cleanoutput 38 hg rebase --abort | cleanrebase
43 39
44 hg glog --template '{rev}: {desc}\n' 40 hg glog --template '{rev}: {desc}\n'