mercurial/cmdutil.py
changeset 4654 e0e73ba37983
parent 4635 63b9d2deed48
child 4667 c7a81e3ae80f
equal deleted inserted replaced
4653:ca023b63ba1f 4654:e0e73ba37983
   318             ui = repo.ui
   318             ui = repo.ui
   319             if not repo.local():
   319             if not repo.local():
   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:
       
   324                     raise hg.RepoError(_("There is no Mercurial repository here"
       
   325                                          " (.hg not found)"))
   323                 raise
   326                 raise
   324         d = lambda: func(ui, repo, *args, **cmdoptions)
   327         d = lambda: func(ui, repo, *args, **cmdoptions)
   325     else:
   328     else:
   326         d = lambda: func(ui, *args, **cmdoptions)
   329         d = lambda: func(ui, *args, **cmdoptions)
   327 
   330