Show More
@@ -233,6 +233,14 b' def create_server(ui, repo):' | |||||
233 | class _mixin: |
|
233 | class _mixin: | |
234 | pass |
|
234 | pass | |
235 |
|
235 | |||
|
236 | if webdir_conf: | |||
|
237 | hgwebobj = hgwebdir(webdir_conf, ui) | |||
|
238 | elif repo is not None: | |||
|
239 | hgwebobj = hgweb(hg.repository(repo.ui, repo.root)) | |||
|
240 | else: | |||
|
241 | raise error.RepoError(_("There is no Mercurial repository" | |||
|
242 | " here (.hg not found)")) | |||
|
243 | ||||
236 | class MercurialHTTPServer(object, _mixin, BaseHTTPServer.HTTPServer): |
|
244 | class MercurialHTTPServer(object, _mixin, BaseHTTPServer.HTTPServer): | |
237 |
|
245 | |||
238 | # SO_REUSEADDR has broken semantics on windows |
|
246 | # SO_REUSEADDR has broken semantics on windows | |
@@ -244,16 +252,7 b' def create_server(ui, repo):' | |||||
244 | self.accesslog = accesslog |
|
252 | self.accesslog = accesslog | |
245 | self.errorlog = errorlog |
|
253 | self.errorlog = errorlog | |
246 | self.daemon_threads = True |
|
254 | self.daemon_threads = True | |
247 | def make_handler(): |
|
255 | self.application = hgwebobj | |
248 | if webdir_conf: |
|
|||
249 | hgwebobj = hgwebdir(webdir_conf, ui) |
|
|||
250 | elif repo is not None: |
|
|||
251 | hgwebobj = hgweb(hg.repository(repo.ui, repo.root)) |
|
|||
252 | else: |
|
|||
253 | raise error.RepoError(_("There is no Mercurial repository" |
|
|||
254 | " here (.hg not found)")) |
|
|||
255 | return hgwebobj |
|
|||
256 | self.application = make_handler() |
|
|||
257 |
|
256 | |||
258 | if ssl_cert: |
|
257 | if ssl_cert: | |
259 | try: |
|
258 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now