comparison mercurial/cmdutil.py @ 4654:e0e73ba37983

Fix dispatch error message when not in a repo
author Brendan Cully <brendan@kublai.com>
date Wed, 20 Jun 2007 20:13:31 -0700
parents 63b9d2deed48
children c7a81e3ae80f
comparison
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