equal
deleted
inserted
replaced
2302 raise hg.RepoError(_("There is no Mercurial repository here" |
2302 raise hg.RepoError(_("There is no Mercurial repository here" |
2303 " (.hg not found)")) |
2303 " (.hg not found)")) |
2304 s = sshserver.sshserver(ui, repo) |
2304 s = sshserver.sshserver(ui, repo) |
2305 s.serve_forever() |
2305 s.serve_forever() |
2306 |
2306 |
|
2307 parentui = ui.parentui or ui |
2307 optlist = ("name templates style address port ipv6" |
2308 optlist = ("name templates style address port ipv6" |
2308 " accesslog errorlog webdir_conf") |
2309 " accesslog errorlog webdir_conf") |
2309 for o in optlist.split(): |
2310 for o in optlist.split(): |
2310 if opts[o]: |
2311 if opts[o]: |
2311 ui.setconfig("web", o, str(opts[o])) |
2312 parentui.setconfig("web", o, str(opts[o])) |
2312 |
2313 |
2313 if repo is None and not ui.config("web", "webdir_conf"): |
2314 if repo is None and not ui.config("web", "webdir_conf"): |
2314 raise hg.RepoError(_("There is no Mercurial repository here" |
2315 raise hg.RepoError(_("There is no Mercurial repository here" |
2315 " (.hg not found)")) |
2316 " (.hg not found)")) |
2316 |
2317 |
2322 args[0], args) |
2323 args[0], args) |
2323 os.close(wfd) |
2324 os.close(wfd) |
2324 os.read(rfd, 1) |
2325 os.read(rfd, 1) |
2325 os._exit(0) |
2326 os._exit(0) |
2326 |
2327 |
2327 httpd = hgweb.server.create_server(ui, repo) |
2328 httpd = hgweb.server.create_server(parentui, repo) |
2328 |
2329 |
2329 if ui.verbose: |
2330 if ui.verbose: |
2330 if httpd.port != 80: |
2331 if httpd.port != 80: |
2331 ui.status(_('listening at http://%s:%d/\n') % |
2332 ui.status(_('listening at http://%s:%d/\n') % |
2332 (httpd.addr, httpd.port)) |
2333 (httpd.addr, httpd.port)) |