Mercurial > hg
comparison tests/test-rebase-pull @ 6906:808f03f61ebe
Add rebase extension
author | Stefano Tortarolo <stefano.tortarolo@gmail.com> |
---|---|
date | Mon, 18 Aug 2008 21:16:31 +0200 |
parents | |
children | 93609576244e |
comparison
equal
deleted
inserted
replaced
6905:248e54a9456e | 6906:808f03f61ebe |
---|---|
1 #!/bin/sh | |
2 | |
3 echo "[extensions]" >> $HGRCPATH | |
4 echo "graphlog=" >> $HGRCPATH | |
5 echo "rebase=" >> $HGRCPATH | |
6 | |
7 BASE=`pwd` | |
8 | |
9 function addcommit { | |
10 echo $1 > $1 | |
11 hg add $1 | |
12 hg commit -d "${2} 0" -u test -m $1 | |
13 } | |
14 function commit { | |
15 hg commit -d "${2} 0" -u test -m $1 | |
16 } | |
17 | |
18 cd $BASE | |
19 rm -rf a | |
20 hg init a | |
21 cd a | |
22 addcommit "C1" 0 | |
23 addcommit "C2" 1 | |
24 | |
25 cd .. | |
26 hg clone a b | |
27 cd b | |
28 addcommit "L1" 2 | |
29 | |
30 cd ../a | |
31 addcommit "R1" 3 | |
32 | |
33 cd ../b | |
34 echo | |
35 echo "% Now b has one revision to be pulled from a" | |
36 hg pull --rebase 2>&1 | sed -e 's/\(saving bundle to \).*/\1/' \ | |
37 -e 's/\(pulling from \).*/\1/' | |
38 | |
39 hg glog --template '{rev}:{desc}\n' | |
40 | |
41 echo | |
42 echo "% Re-run pull --rebase" | |
43 hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/' | |
44 | |
45 echo | |
46 echo "% Invoke pull --rebase with --update" | |
47 hg pull --rebase --update | |
48 | |
49 exit 0 |