##// END OF EJS Templates
tests: fixup tests using unzip -l
tests: fixup tests using unzip -l

File last commit:

r11208:2313dc4d default
r12339:f85338f5 default
Show More
test-rebase-collapse
177 lines | 2.7 KiB | text/plain | TextLexer
/ tests / test-rebase-collapse
Stefano Tortarolo
Add rebase extension
r6906 #!/bin/sh
Yuya Nishihara
tests: fix bashism to load helpers.sh...
r11208 . $TESTDIR/helpers.sh
Matt Mackall
rebase: use helpers.sh in tests
r11198
Stefano Tortarolo
Add rebase extension
r6906 echo "[extensions]" >> $HGRCPATH
echo "graphlog=" >> $HGRCPATH
echo "rebase=" >> $HGRCPATH
BASE=`pwd`
Brendan Cully
Debashify rebase tests
r6910 addcommit () {
Stefano Tortarolo
Add rebase extension
r6906 echo $1 > $1
hg add $1
Martin Geisler
tests: removed redundant "-u test" from test scripts...
r8168 hg commit -d "${2} 0" -m $1
Stefano Tortarolo
Add rebase extension
r6906 }
Brendan Cully
Debashify rebase tests
r6910
commit () {
Martin Geisler
tests: removed redundant "-u test" from test scripts...
r8168 hg commit -d "${2} 0" -m $1
Stefano Tortarolo
Add rebase extension
r6906 }
Brendan Cully
Debashify rebase tests
r6910 createrepo () {
Stefano Tortarolo
Add rebase extension
r6906 cd $BASE
rm -rf a
hg init a
cd a
addcommit "A" 0
addcommit "B" 1
addcommit "C" 2
addcommit "D" 3
hg update -C 0
addcommit "E" 4
hg update -C 0
addcommit "F" 5
hg merge -r 4
commit "G" 6
hg update -C 5
addcommit "H" 7
}
createrepo > /dev/null 2>&1
hg glog --template '{rev}: {desc}\n'
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo '% Rebasing B onto H'
Stefano Tortarolo
Add rebase extension
r6906 hg up -C 3
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg rebase --collapse --keepbranches | hidebackup
Stefano Tortarolo
Add rebase extension
r6906 hg glog --template '{rev}: {desc}\n'
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo "Expected A, B, C, D, F, H"
hg manifest
Stefano Tortarolo
Add rebase extension
r6906
createrepo > /dev/null 2>&1
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo
echo '% Rebasing G onto H'
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg rebase --base 6 --collapse | hidebackup
Stefano Tortarolo
Add rebase extension
r6906 hg glog --template '{rev}: {desc}\n'
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo "Expected A, E, F, H"
hg manifest
Stefano Tortarolo
Add rebase extension
r6906
Brendan Cully
Debashify rebase tests
r6910 createrepocomplex () {
Stefano Tortarolo
Add rebase extension
r6906 cd $BASE
rm -rf a
hg init a
cd a
addcommit "A" 0
addcommit "B" 1
hg up 0
addcommit "C" 2
hg merge
commit "D" 3
hg up 1
addcommit "E" 4
addcommit "F" 5
hg merge
commit "G" 6
hg up 0
addcommit "H" 7
}
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo
Stefano Tortarolo
Add rebase extension
r6906 createrepocomplex > /dev/null 2>&1
hg glog --template '{rev}: {desc}\n'
echo
echo '% Rebase and collapse - more than one external (fail)'
hg rebase -s 2 --collapse
echo
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo '% Rebase and collapse - E onto H'
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg rebase -s 4 --collapse | hidebackup
Stefano Tortarolo
Add rebase extension
r6906 hg glog --template '{rev}: {desc}\n'
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 echo "Expected A, B, C, E, F, H"
hg manifest
Stefano Tortarolo
Add rebase extension
r6906
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278 createrepocomplex () {
cd $BASE
rm -rf a
hg init a
cd a
addcommit "A" 0
addcommit "B" 1
hg up 0
addcommit "C" 2
hg merge
commit "D" 3
hg up 1
addcommit "E" 4
echo "F" > E
commit "F" 5
addcommit "G" 6
hg merge
commit "H" 7
hg up 0
addcommit "I" 8
}
echo
createrepocomplex > /dev/null 2>&1
hg glog --template '{rev}: {desc}\n'
echo
echo '% Rebase and collapse - E onto I'
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg rebase -s 4 --collapse | hidebackup
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278
hg glog --template '{rev}: {desc}\n'
echo "Expected A, B, C, E, G, I"
hg manifest
echo 'Cat E:'
cat E
createrepocomplex () {
cd $BASE
rm -rf a
hg init a
cd a
addcommit "A" 0
addcommit "B" 1
addcommit "C" 2
hg up 1
addcommit "D" 3
hg merge
commit "E" 4
hg up 0
addcommit "F" 5
}
echo
createrepocomplex > /dev/null 2>&1
hg glog --template '{rev}: {desc}\n'
echo
echo '% Rebase and collapse - B onto F'
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg rebase -s 1 --collapse | hidebackup
Stefano Tortarolo
rebase: avoid redundant merges (issue1301)
r7278
hg glog --template '{rev}: {desc}\n'
echo "Expected A, B, C, D, F"
hg manifest
Stefano Tortarolo
Add rebase extension
r6906 exit 0