##// END OF EJS Templates
i18n-pt_BR: synchronized with 552e0cfbddbd
i18n-pt_BR: synchronized with 552e0cfbddbd

File last commit:

r12378:ab237534 stable
r12596:e356c5c2 stable
Show More
test-mq-safety
90 lines | 1.5 KiB | text/plain | TextLexer
#!/bin/sh
echo '[extensions]' >> $HGRCPATH
echo 'mq =' >> $HGRCPATH
hg init repo
cd repo
echo foo > foo
hg ci -qAm 'add a file'
hg qinit
hg qnew foo
echo foo >> foo
hg qrefresh -m 'append foo'
hg qnew bar
echo bar >> foo
hg qrefresh -m 'append bar'
echo '% try to commit on top of a patch'
echo quux >> foo
hg ci -m 'append quux'
# cheat a bit...
mv .hg/patches .hg/patches2
hg ci -m 'append quux'
mv .hg/patches2 .hg/patches
echo '% qpop/qrefresh on the wrong revision'
hg qpop
hg qpop -n patches 2>&1 | sed -e 's/\(using patch queue:\).*/\1/'
hg qrefresh
hg up -C qtip
echo '% qpop'
hg qpop
echo '% qrefresh'
hg qrefresh
echo '% tip:'
hg tip --template '{rev} {desc}\n'
echo '% qpush warning branchheads'
cd ..
hg init branchy
cd branchy
echo q > q
hg add q
hg qnew -f qp
hg qpop
echo a > a
hg ci -Ama
hg up null
hg branch b
echo c > c
hg ci -Amc
hg merge default
hg ci -mmerge
hg up default
hg log
hg qpush
cd ..
echo '% testing applied patches, push and --force'
hg init forcepush
cd forcepush
echo a > a
hg ci -Am adda
echo a >> a
hg ci -m changea
hg up 0
hg branch branch
echo b > b
hg ci -Am addb
hg up 0
hg --cwd .. clone -r 0 forcepush forcepush2
echo a >> a
hg qnew patch
echo '% pushing applied patch with --rev without --force'
hg push -r default ../forcepush2
echo '% pushing applied patch with branchhash, without --force'
hg push ../forcepush2#default
echo '% pushing revs excluding applied patch'
hg push --new-branch -r branch -r 2 ../forcepush2
echo '% pushing applied patch with --force'
hg push --force -r default ../forcepush2
cd ..