tests/test-mq-qpush-fail
author Matt Mackall <mpm@selenic.com>
Thu, 07 May 2009 19:39:45 -0500
changeset 8314 57a41c08feab
parent 8167 6c82beaaa11a
child 8795 51c29aec0b75
permissions -rwxr-xr-x
revlog: preread revlog .i file Smaller revlogs can be read with a single read, do it on open.

#!/bin/sh

# Test that qpush cleans things up if it doesn't complete

echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH

hg init repo
cd repo

echo foo > foo
hg ci -Am 'add foo'

touch untracked-file
echo 'syntax: glob' > .hgignore
echo '.hgignore' >> .hgignore

hg qinit
hg qnew patch1
echo >> foo
hg qrefresh -m 'patch 1'

hg qnew patch2
echo bar > bar
hg add bar
hg qrefresh -m 'patch 2'

hg qnew bad-patch
echo >> foo
hg qrefresh

hg qpop -a

python -c 'print "\xe9"' > message
cat .hg/patches/bad-patch >> message
mv message .hg/patches/bad-patch

hg qpush -a && echo 'qpush succeded?!'

hg parents

echo '% bar should be gone; other unknown/ignored files should still be around'
hg status -A