comparison mercurial/dispatch.py @ 13967:f85c9b0fdb32

dispatch: improve repository not found message This should help clarify what the problem is in various problematic cases like ssh.
author Matt Mackall <mpm@selenic.com>
date Wed, 20 Apr 2011 14:28:40 -0500
parents 14d0553bd48b
children 97ed99d1f419
comparison
equal deleted inserted replaced
13966:a1c31c64bcd3 13967:f85c9b0fdb32
584 repos = map(cmdutil.findrepo, args) 584 repos = map(cmdutil.findrepo, args)
585 guess = repos[0] 585 guess = repos[0]
586 if guess and repos.count(guess) == len(repos): 586 if guess and repos.count(guess) == len(repos):
587 return _dispatch(ui, ['--repository', guess] + fullargs) 587 return _dispatch(ui, ['--repository', guess] + fullargs)
588 if not path: 588 if not path:
589 raise error.RepoError(_("There is no Mercurial repository" 589 raise error.RepoError(_("no repository found in %r"
590 " here (.hg not found)")) 590 " (.hg not found)") % os.getcwd())
591 raise 591 raise
592 args.insert(0, repo) 592 args.insert(0, repo)
593 elif rpath: 593 elif rpath:
594 ui.warn(_("warning: --repository ignored\n")) 594 ui.warn(_("warning: --repository ignored\n"))
595 595