mercurial/cmdutil.py
changeset 4667 c7a81e3ae80f
parent 4654 e0e73ba37983
child 4670 850950e59b52
equal deleted inserted replaced
4666:48c94bffdb28 4667:c7a81e3ae80f
   314     repo = None
   314     repo = None
   315     if cmd not in commands.norepo.split():
   315     if cmd not in commands.norepo.split():
   316         try:
   316         try:
   317             repo = hg.repository(ui, path=path)
   317             repo = hg.repository(ui, path=path)
   318             ui = repo.ui
   318             ui = repo.ui
   319             if not repo.local():
   319             if not repo.local() and cmd not in commands.remoterepo.split():
   320                 raise util.Abort(_("repository '%s' is not local") % path)
   320                 raise util.Abort(_("repository '%s' is not local") % path)
   321         except hg.RepoError:
   321         except hg.RepoError:
   322             if cmd not in commands.optionalrepo.split():
   322             if cmd not in commands.optionalrepo.split():
   323                 if not path:
   323                 if not path:
   324                     raise hg.RepoError(_("There is no Mercurial repository here"
   324                     raise hg.RepoError(_("There is no Mercurial repository here"