author | Martin Geisler <mg@lazybytes.net> |
Sat, 19 Jun 2010 17:19:14 +0200 | |
changeset 11392 | a87906461835 |
parent 11208 | 2313dc4d9817 |
permissions | -rwxr-xr-x |
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
2 |
|
11208
2313dc4d9817
tests: fix bashism to load helpers.sh
Yuya Nishihara <yuya@tcha.org>
parents:
11198
diff
changeset
|
3 |
. $TESTDIR/helpers.sh |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
8168
diff
changeset
|
4 |
|
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
5 |
echo "[extensions]" >> $HGRCPATH |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
6 |
echo "graphlog=" >> $HGRCPATH |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
7 |
echo "rebase=" >> $HGRCPATH |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
8 |
|
6910 | 9 |
addcommit () { |
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
10 |
echo $1 > $1 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
11 |
hg add $1 |
8168
8766fee6f225
tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
6910
diff
changeset
|
12 |
hg commit -d "${2} 0" -m $1 |
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
13 |
} |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
14 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
15 |
hg init a |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
16 |
cd a |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
17 |
addcommit "c1" 0 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
18 |
addcommit "c2" 1 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
19 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
20 |
addcommit "l1" 2 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
21 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
22 |
hg update -C 1 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
23 |
addcommit "r1" 3 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
24 |
addcommit "r2" 4 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
25 |
hg glog --template '{rev}:{desc}\n' |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
26 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
27 |
echo |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
28 |
echo '% Rebase with no arguments - single revision in source branch' |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
29 |
hg update -C 2 |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
8168
diff
changeset
|
30 |
hg rebase | hidebackup |
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
31 |
hg glog --template '{rev}:{desc}\n' |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
32 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
33 |
cd .. |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
34 |
rm -rf a |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
35 |
hg init a |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
36 |
cd a |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
37 |
addcommit "c1" 0 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
38 |
addcommit "c2" 1 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
39 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
40 |
addcommit "l1" 2 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
41 |
addcommit "l2" 3 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
42 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
43 |
hg update -C 1 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
44 |
addcommit "r1" 4 |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
45 |
hg glog --template '{rev}:{desc}\n' |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
46 |
|
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
47 |
echo |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
48 |
echo '% Rebase with no arguments - single revision in target branch' |
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
49 |
hg update -C 3 |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
8168
diff
changeset
|
50 |
hg rebase 2>&1 | hidebackup |
6906
808f03f61ebe
Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
51 |
hg glog --template '{rev}:{desc}\n' |