Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 3079:4c9fcb5e3b82
If local repository is missing, make error message clearer.
Faheem Mitha suggested finding a better error message.
The nice error message is taken from cogito.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 11 Sep 2006 10:08:30 +0200 |
parents | bc3fe3b5b785 |
children | e270cbd4aa20 |
comparison
equal
deleted
inserted
replaced
3078:baa3873eb387 | 3079:4c9fcb5e3b82 |
---|---|
2456 stderr. Use the "-A" and "-E" options to log to files. | 2456 stderr. Use the "-A" and "-E" options to log to files. |
2457 """ | 2457 """ |
2458 | 2458 |
2459 if opts["stdio"]: | 2459 if opts["stdio"]: |
2460 if repo is None: | 2460 if repo is None: |
2461 raise hg.RepoError(_('no repo found')) | 2461 raise hg.RepoError(_("There is no Mercurial repository here" |
2462 " (.hg not found)")) | |
2462 s = sshserver.sshserver(ui, repo) | 2463 s = sshserver.sshserver(ui, repo) |
2463 s.serve_forever() | 2464 s.serve_forever() |
2464 | 2465 |
2465 optlist = ("name templates style address port ipv6" | 2466 optlist = ("name templates style address port ipv6" |
2466 " accesslog errorlog webdir_conf") | 2467 " accesslog errorlog webdir_conf") |
2467 for o in optlist.split(): | 2468 for o in optlist.split(): |
2468 if opts[o]: | 2469 if opts[o]: |
2469 ui.setconfig("web", o, opts[o]) | 2470 ui.setconfig("web", o, opts[o]) |
2470 | 2471 |
2471 if repo is None and not ui.config("web", "webdir_conf"): | 2472 if repo is None and not ui.config("web", "webdir_conf"): |
2472 raise hg.RepoError(_('no repo found')) | 2473 raise hg.RepoError(_("There is no Mercurial repository here" |
2474 " (.hg not found)")) | |
2473 | 2475 |
2474 if opts['daemon'] and not opts['daemon_pipefds']: | 2476 if opts['daemon'] and not opts['daemon_pipefds']: |
2475 rfd, wfd = os.pipe() | 2477 rfd, wfd = os.pipe() |
2476 args = sys.argv[:] | 2478 args = sys.argv[:] |
2477 args.append('--daemon-pipefds=%d,%d' % (rfd, wfd)) | 2479 args.append('--daemon-pipefds=%d,%d' % (rfd, wfd)) |