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
mkdir a
cd a
hg init
echo 123 > a
hg add a
hg commit -m "a" -u a -d "1000000 0"
cd ..
mkdir b
cd b
hg init
echo 321 > b
hg add b
hg commit -m "b" -u b -d "1000000 0"
hg pull ../a
hg pull -f ../a
hg heads