diff mercurial/dispatch.py @ 5664:da72b4d24797

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).
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Tue, 18 Dec 2007 14:11:13 -0600
parents e04a65111a80
children 863e237b58fb
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sat Nov 03 11:11:13 2007 +0100
+++ b/mercurial/dispatch.py	Tue Dec 18 14:11:13 2007 -0600
@@ -331,6 +331,7 @@
         try:
             repo = hg.repository(ui, path=path)
             ui = repo.ui
+            ui.setconfig("bundle", "mainreporoot", repo.root)
             if not repo.local():
                 raise util.Abort(_("repository '%s' is not local") % path)
         except hg.RepoError: