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)) |