Set bundle.mainreporoot only after checking that it's a local repo
Fixes
issue977.
--- a/mercurial/dispatch.py Thu Feb 14 20:54:52 2008 +0100
+++ b/mercurial/dispatch.py Thu Feb 14 18:08:16 2008 -0200
@@ -340,9 +340,9 @@
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)
+ ui.setconfig("bundle", "mainreporoot", repo.root)
except hg.RepoError:
if cmd not in commands.optionalrepo.split():
if not path: