diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -316,7 +316,7 @@ def dispatch(ui, args): try: repo = hg.repository(ui, path=path) ui = repo.ui - if not repo.local(): + if not repo.local() and cmd not in commands.remoterepo.split(): raise util.Abort(_("repository '%s' is not local") % path) except hg.RepoError: if cmd not in commands.optionalrepo.split():