# HG changeset patch # User Alexis S. L. Carvalho # Date 1203019696 7200 # Node ID 6480af8fd53cc0a8360780824e5725b9196f5c66 # Parent 352ac98758072899107b4fa571a1df5f1c1b2eea Set bundle.mainreporoot only after checking that it's a local repo Fixes issue977. diff -r 352ac9875807 -r 6480af8fd53c mercurial/dispatch.py --- 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: