Fix income/pull with bundle and -R (issue 820).
Uses ui.setconfig() to tell bundlerepo where the main repo is. This is
needed for when the --repository option is used.
Adds tests to test-bundle and a new test script
test-mq-pull-from-bundle, which plays out the situation that initially
made me detect this bug
(hg -R .hg/patches pull ../bundle.hg).
#!/bin/sh
# Test issue 529 - mq aborts when merging patch deleting files
rewrite_path()
{
sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g'
}
checkundo()
{
if [ -f .hg/store/undo ]; then
echo ".hg/store/undo still exists after $1"
fi
}
echo "[extensions]" >> $HGRCPATH
echo "hgext.mq=" >> $HGRCPATH
# 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
hg qsave -c -e 2>&1 | rewrite_path
checkundo qsave
# 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
hg qpush -a -m 2>&1 | rewrite_path
checkundo 'qpush -m'
hg manifest
# ensure status is correct after merge
hg qpop -a