##// END OF EJS Templates
Ignore .DS_Store directories...
Ignore .DS_Store directories These are used by Finder on OS X.

File last commit:

r2935:1c66aad2 default
r2987:12d1475b default
Show More
test-mq
155 lines | 1.9 KiB | text/plain | TextLexer
Vadim Gelfer
mq: add basic tests
r2729 #!/bin/sh
HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
echo "[extensions]" >> $HGTMP/.hgrc
echo "mq=" >> $HGTMP/.hgrc
echo % help
hg help mq
hg init a
cd a
echo a > a
Vadim Gelfer
mq: do not allow to push from repo with patches applied
r2848 hg ci -Ama
hg clone . ../k
Vadim Gelfer
mq: add basic tests
r2729 mkdir b
echo z > b/z
hg ci -Ama
echo % qinit
hg qinit
cd ..
hg init b
echo % -R qinit
hg -R b qinit
hg init c
echo % qinit -c
hg --cwd c qinit -c
hg -R c/.hg/patches st
echo % qnew implies add
hg -R c qnew test.patch
hg -R c/.hg/patches st
cd a
echo % qnew -m
hg qnew -m 'foo bar' test.patch
cat .hg/patches/test.patch
echo % qrefresh
echo a >> a
hg qrefresh
Danek Duvall
Fix some tests for portability.
r2843 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \
Vadim Gelfer
mq: add basic tests
r2729 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch
echo % qpop
hg qpop
echo % qpush
hg qpush
cd ..
echo % pop/push outside repo
hg -R a qpop
hg -R a qpush
cd a
hg qnew test2.patch
echo % qrefresh in subdir
cd b
echo a > a
hg add a
hg qrefresh
echo % pop/push -a in subdir
hg qpop -a
hg --traceback qpush -a
echo % qseries
hg qseries
echo % qapplied
hg qapplied
echo % qtop
hg qtop
echo % qprev
hg qprev
echo % qnext
hg qnext
echo % pop, qnext, qprev, qapplied
hg qpop
hg qnext
hg qprev
hg qapplied
Vadim Gelfer
mq: test commit in repo with patches applied
r2846 echo % commit should fail
hg commit
Vadim Gelfer
mq: do not allow to push from repo with patches applied
r2848 echo % push should fail
hg push ../../k
Vadim Gelfer
mq: add basic tests
r2729 echo % qunapplied
hg qunapplied
Vadim Gelfer
mq: do not allow to push from repo with patches applied
r2848 echo % push should succeed
hg qpop -a
hg push ../../k
Vadim Gelfer
mq: add basic tests
r2729 echo % strip
cd ../../b
echo x>x
hg ci -Ama
hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
hg unbundle .hg/strip-backup/*
Brendan Cully
Teach mq about git patches
r2934
cat >>$HGTMP/.hgrc <<EOF
[diff]
git = True
EOF
cd ..
hg init git
cd git
hg qinit
hg qnew -m'new file' new
echo foo > new
chmod +x new
hg add new
hg qrefresh
Brendan Cully
sed portability fixes
r2935 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new
Brendan Cully
Teach mq about git patches
r2934
hg qnew -m'copy file' copy
hg cp new copy
hg qrefresh
Brendan Cully
sed portability fixes
r2935 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy
Brendan Cully
Teach mq about git patches
r2934
hg qpop
hg qpush
hg qdiff