Mercurial > hg
comparison 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 |
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 "rebase=" >> $HGRCPATH | 6 echo "rebase=" >> $HGRCPATH |
5 echo "[diff]" >> $HGRCPATH | 7 echo "[diff]" >> $HGRCPATH |
6 echo "git=1" >> $HGRCPATH | 8 echo "git=1" >> $HGRCPATH |
7 | 9 |
8 BASE=`pwd` | 10 BASE=`pwd` |
9 | |
10 cleanoutput () { | |
11 sed -e 's/\(Rebase status stored to\).*/\1/' \ | |
12 -e 's/\(Rebase status restored from\).*/\1/' \ | |
13 -e 's/\(saving bundle to \).*/\1/' | |
14 } | |
15 | 11 |
16 hg init repo1 | 12 hg init repo1 |
17 cd repo1 | 13 cd repo1 |
18 echo "a">a | 14 echo "a">a |
19 hg commit -Am "A" --date '0 0' | 15 hg commit -Am "A" --date '0 0' |
26 echo | 22 echo |
27 echo '% Rename is tracked' | 23 echo '% Rename is tracked' |
28 hg log -p -r tip --template '{rev}:{desc}\n' | 24 hg log -p -r tip --template '{rev}:{desc}\n' |
29 | 25 |
30 echo '% Rebase the revision containing the rename' | 26 echo '% Rebase the revision containing the rename' |
31 hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput | 27 hg rebase -s 2 -d 1 --quiet | cleanrebase |
32 | 28 |
33 echo | 29 echo |
34 echo '% Rename is not lost' | 30 echo '% Rename is not lost' |
35 hg log -p -r tip --template '{rev}:{desc}\n' | 31 hg log -p -r tip --template '{rev}:{desc}\n' |
36 | 32 |
49 echo | 45 echo |
50 echo '% Copy is tracked' | 46 echo '% Copy is tracked' |
51 hg log -p -r tip --template '{rev}:{desc}\n' | 47 hg log -p -r tip --template '{rev}:{desc}\n' |
52 | 48 |
53 echo '% Rebase the revision containing the copy' | 49 echo '% Rebase the revision containing the copy' |
54 hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput | 50 hg rebase -s 2 -d 1 --quiet | cleanrebase |
55 | 51 |
56 echo | 52 echo |
57 echo '% Copy is not lost' | 53 echo '% Copy is not lost' |
58 hg log -p -r tip --template '{rev}:{desc}\n' | 54 hg log -p -r tip --template '{rev}:{desc}\n' |
59 | 55 |