equal
deleted
inserted
replaced
886 return default |
886 return default |
887 |
887 |
888 address = repo.ui.config("web", "address", "") |
888 address = repo.ui.config("web", "address", "") |
889 port = int(repo.ui.config("web", "port", 8000)) |
889 port = int(repo.ui.config("web", "port", 8000)) |
890 use_ipv6 = repo.ui.configbool("web", "ipv6") |
890 use_ipv6 = repo.ui.configbool("web", "ipv6") |
|
891 webdir_conf = repo.ui.config("web", "webdir_conf") |
891 accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout) |
892 accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout) |
892 errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr) |
893 errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr) |
893 |
894 |
894 if use_threads: |
895 if use_threads: |
895 try: |
896 try: |
972 accept = accept + line[7:].split(',') |
973 accept = accept + line[7:].split(',') |
973 env['HTTP_ACCEPT'] = ','.join(accept) |
974 env['HTTP_ACCEPT'] = ','.join(accept) |
974 |
975 |
975 req = hgrequest(self.rfile, self.wfile, env) |
976 req = hgrequest(self.rfile, self.wfile, env) |
976 self.send_response(200, "Script output follows") |
977 self.send_response(200, "Script output follows") |
977 hgweb(repo.__class__(repo.ui, repo.origroot)).run(req) |
978 |
|
979 if webdir_conf: |
|
980 hgwebobj = hgwebdir(hgwebdir_conf) |
|
981 else: |
|
982 hgwebobj = hgweb(repo.__class__(repo.ui, repo.origroot)) |
|
983 hgwebobj.run(req) |
|
984 |
978 |
985 |
979 if use_ipv6: |
986 if use_ipv6: |
980 return IPv6HTTPServer((address, port), hgwebhandler) |
987 return IPv6HTTPServer((address, port), hgwebhandler) |
981 else: |
988 else: |
982 return MercurialHTTPServer((address, port), hgwebhandler) |
989 return MercurialHTTPServer((address, port), hgwebhandler) |