equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 |
|
3 echo "[extensions]" >> $HGRCPATH |
|
4 echo "graphlog=" >> $HGRCPATH |
|
5 echo "rebase=" >> $HGRCPATH |
|
6 |
|
7 addcommit () { |
|
8 echo $1 > $1 |
|
9 hg add $1 |
|
10 hg commit -d "${2} 0" -m $1 |
|
11 } |
|
12 |
|
13 hg init a |
|
14 cd a |
|
15 addcommit "c1" 0 |
|
16 addcommit "c2" 1 |
|
17 |
|
18 addcommit "l1" 2 |
|
19 addcommit "l2" 3 |
|
20 |
|
21 hg update -C 1 |
|
22 hg branch 'notdefault' |
|
23 addcommit "r1" 4 |
|
24 hg glog --template '{rev}:{desc}:{branches}\n' |
|
25 |
|
26 echo |
|
27 echo '% Rebase a branch while preserving the branch name' |
|
28 hg update -C 3 |
|
29 hg rebase -b 4 -d 3 --keepbranches -q |
|
30 hg glog --template '{rev}:{desc}:{branches}\n' |
|
31 echo '% dirstate branch should be "notdefault"' |
|
32 hg branch |
|