##// END OF EJS Templates
tests: fix bashism to load helpers.sh...
tests: fix bashism to load helpers.sh `source` isn't available at POSIX sh.

File last commit:

r11208:2313dc4d default
r11208:2313dc4d default
Show More
test-rebase-pull
63 lines | 1.1 KiB | text/plain | TextLexer
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
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 }
rm -rf a
hg init a
cd a
addcommit "C1" 0
addcommit "C2" 1
cd ..
hg clone a b
Stefano Tortarolo
rebase: pull --rebase updates if there is nothing to rebase
r7786 # This is needed to test pull --rebase
hg clone a c
Stefano Tortarolo
Add rebase extension
r6906 cd b
addcommit "L1" 2
cd ../a
addcommit "R1" 3
cd ../b
echo
echo "% Now b has one revision to be pulled from a"
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg pull --rebase | hidebackup | sed -e 's/\(pulling from \).*/\1/'
Stefano Tortarolo
Add rebase extension
r6906
hg glog --template '{rev}:{desc}\n'
echo
echo "% Re-run pull --rebase"
Matt Mackall
rebase: use helpers.sh in tests
r11198 hg pull --rebase | sed 's/\(pulling from \).*/\1/'
Stefano Tortarolo
Add rebase extension
r6906
echo
Stefano Tortarolo
rebase: pull --rebase updates if there is nothing to rebase
r7786 echo "% Invoke pull --rebase and nothing to rebase"
cd ../c
hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/'
hg glog --template '{rev}\n' -l 1
echo
Martijn Pieters
Fix typeerror when specifying both --rebase and --pull
r8242 echo "% pull --rebase --update should ignore --update"
hg pull --rebase --update 2>&1 | sed 's/\(pulling from \).*/\1/'
echo
Stefano Tortarolo
rebase: pull --rebase updates if there is nothing to rebase
r7786 echo "% pull --rebase doesn't update if nothing has been pulled"
hg up 1
hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/'
hg glog --template '{rev}\n' -l 1
Stefano Tortarolo
Add rebase extension
r6906
exit 0