Set bundle.mainreporoot only after checking that it's a local repo

Fixes issue977.
This commit is contained in:
Alexis S. L. Carvalho 2008-02-14 18:08:16 -02:00
parent f9eaeef169
commit e073cf982f

View File

@ -340,9 +340,9 @@ def _dispatch(ui, args):
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: