##// END OF EJS Templates
Fix dispatch error message when not in a repo
Brendan Cully -
r4654:e0e73ba3 default
parent child Browse files
Show More
@@ -320,6 +320,9 b' def dispatch(ui, args):'
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:
@@ -17,3 +17,9 b' cat = -v'
17 EOF
17 EOF
18 hg cat a
18 hg cat a
19
19
20 echo '% no repo'
21 cd ..
22 hg cat
23
24 exit 0
25 No newline at end of file
@@ -28,3 +28,5 b' use "hg -v help cat" to show global opti'
28 % [defaults]
28 % [defaults]
29 a
29 a
30 a
30 a
31 % no repo
32 abort: There is no Mercurial repository here (.hg not found)!
General Comments 0
You need to be logged in to leave comments. Login now