##// END OF EJS Templates
tests: remove unneeded -d flags...
tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.

File last commit:

r11071:2376b4cc stable
r12156:4c94b6d0 default
Show More
test-mq-merge
79 lines | 1.6 KiB | text/plain | TextLexer
Patrick Mezard
Add test for issue 529 - "mq aborts when merging patch deleting files".
r4333 #!/bin/sh
# Test issue 529 - mq aborts when merging patch deleting files
Alexis S. L. Carvalho
mq: really remove undo after a qpush (and after a strip)...
r5527 checkundo()
{
if [ -f .hg/store/undo ]; then
echo ".hg/store/undo still exists after $1"
fi
}
Patrick Mezard
Add test for issue 529 - "mq aborts when merging patch deleting files".
r4333 echo "[extensions]" >> $HGRCPATH
Martin Geisler
tests: load with "ext =" instead of "hgext.ext ="
r10119 echo "mq =" >> $HGRCPATH
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 echo "[mq]" >> $HGRCPATH
echo "git = keep" >> $HGRCPATH
Patrick Mezard
Add test for issue 529 - "mq aborts when merging patch deleting files".
r4333
# Commit two dummy files in "init" changeset
hg init t
cd t
echo a > a
echo b > b
hg ci -Am init
hg tag -l init
# Create a patch removing a
hg qnew rm_a
hg rm a
hg qrefresh -m "rm a"
# Save the patch queue so we can merge it later
Mads Kiilerich
test-mq-merge: quote ^...
r11071 hg qsave -c -e 2>&1 | grep -v '^copy'
Alexis S. L. Carvalho
mq: really remove undo after a qpush (and after a strip)...
r5527 checkundo qsave
Patrick Mezard
Add test for issue 529 - "mq aborts when merging patch deleting files".
r4333
# Update b and commit in an "update" changeset
hg up -C init
echo b >> b
hg st
hg ci -m update
# Here, qpush used to abort with :
# The system cannot find the file specified => a
hg manifest
Mads Kiilerich
test-mq-merge: quote ^...
r11071 hg qpush -a -m 2>&1 | grep -v '^merging'
Alexis S. L. Carvalho
mq: really remove undo after a qpush (and after a strip)...
r5527 checkundo 'qpush -m'
Patrick Mezard
Add test for issue 529 - "mq aborts when merging patch deleting files".
r4333 hg manifest
Brendan Cully
Make mergepatch save queue now that qpush isn't.
r4437
# ensure status is correct after merge
hg qpop -a
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 cd ..
# Classic MQ merge sequence *with an explicit named queue*
echo
echo % init t2
hg init t2
cd t2
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 echo '[diff]' > .hg/hgrc
echo 'nodates = 1' >> .hg/hgrc
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 echo a > a
hg ci -Am init
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 echo b > a
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 hg ci -m changea
hg up -C 0
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 hg cp a aa
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 echo c >> a
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 hg qnew --git -f -e patcha
echo d >> a
hg qnew -d '0 0' -f -e patcha2
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 echo % create the reference queue
hg qsave -c -e -n refqueue 2> /dev/null
hg up -C 1
echo % merge
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 HGMERGE=internal:other hg qpush -a -m -n refqueue 2>&1 | \
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 sed 's/merging with queue at.*refqueue/merging with queue at refqueue/'
Patrick Mezard
mq: preserve --git flag when merging patches...
r10185 echo % check patcha is still a git patch
cat .hg/patches/patcha
echo % check patcha2 is still a regular patch
grep git .hg/patches/patcha2 && echo 'git patch found!'
Patrick Mezard
test-mq-merge: test mq merge and explicit patch queue
r6628 cd ..