view tests/test-mq-qpush-fail @ 5483:0c43f87baba3 default tip

Fix file-changed-to-dir and dir-to-file commits (issue660). Allow adding to dirstate files that clash with previously existing but marked for removal. Protect from reintroducing clashes by revert. This change doesn't address related issues with update. Current workaround is to do "clean" update by manually removing conflicting files/dirs from working directory.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Oct 2007 16:27:55 +0400
parents 17f5d2069551
children
line wrap: on
line source

#!/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' -d '0 0'

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