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