Show More
@@ -13,8 +13,7 b' demandload(globals(), "fancyopts ui hg u' | |||||
13 | demandload(globals(), "fnmatch mdiff random signal tempfile time") |
|
13 | demandload(globals(), "fnmatch mdiff random signal tempfile time") | |
14 | demandload(globals(), "traceback errno socket version struct atexit sets bz2") |
|
14 | demandload(globals(), "traceback errno socket version struct atexit sets bz2") | |
15 | demandload(globals(), "archival changegroup") |
|
15 | demandload(globals(), "archival changegroup") | |
16 |
demandload(globals(), " |
|
16 | demandload(globals(), "hgweb.server") | |
17 | demandload(globals(), "mercurial.hgweb:hgweb,hgwebdir") |
|
|||
18 |
|
17 | |||
19 | class UnknownCommand(Exception): |
|
18 | class UnknownCommand(Exception): | |
20 | """Exception raised if command is not in the command table.""" |
|
19 | """Exception raised if command is not in the command table.""" | |
@@ -2544,7 +2543,7 b' def serve(ui, repo, **opts):' | |||||
2544 | os._exit(0) |
|
2543 | os._exit(0) | |
2545 |
|
2544 | |||
2546 | try: |
|
2545 | try: | |
2547 |
httpd = create_server(ui, repo |
|
2546 | httpd = hgweb.server.create_server(ui, repo) | |
2548 | except socket.error, inst: |
|
2547 | except socket.error, inst: | |
2549 | raise util.Abort(_('cannot start server: ') + inst.args[1]) |
|
2548 | raise util.Abort(_('cannot start server: ') + inst.args[1]) | |
2550 |
|
2549 |
@@ -10,7 +10,7 b' from mercurial.demandload import demandl' | |||||
10 | import os, sys, errno |
|
10 | import os, sys, errno | |
11 | demandload(globals(), "urllib BaseHTTPServer socket SocketServer") |
|
11 | demandload(globals(), "urllib BaseHTTPServer socket SocketServer") | |
12 | demandload(globals(), "mercurial:ui,hg,util,templater") |
|
12 | demandload(globals(), "mercurial:ui,hg,util,templater") | |
13 |
demandload(globals(), " |
|
13 | demandload(globals(), "hgweb_mod:hgweb hgwebdir_mod:hgwebdir request:hgrequest") | |
14 | from mercurial.i18n import gettext as _ |
|
14 | from mercurial.i18n import gettext as _ | |
15 |
|
15 | |||
16 | def _splitURI(uri): |
|
16 | def _splitURI(uri): | |
@@ -87,7 +87,7 b' class _hgwebhandler(object, BaseHTTPServ' | |||||
87 | self.send_response(200, "Script output follows") |
|
87 | self.send_response(200, "Script output follows") | |
88 | self.server.make_and_run_handler(req) |
|
88 | self.server.make_and_run_handler(req) | |
89 |
|
89 | |||
90 |
def create_server(ui, repo |
|
90 | def create_server(ui, repo): | |
91 | use_threads = True |
|
91 | use_threads = True | |
92 |
|
92 | |||
93 | def openlog(opt, default): |
|
93 | def openlog(opt, default): | |
@@ -123,8 +123,8 b' def create_server(ui, repo, webdirmaker,' | |||||
123 | self.errorlog = errorlog |
|
123 | self.errorlog = errorlog | |
124 | self.repo = repo |
|
124 | self.repo = repo | |
125 | self.webdir_conf = webdir_conf |
|
125 | self.webdir_conf = webdir_conf | |
126 |
self.webdirmaker = webdir |
|
126 | self.webdirmaker = hgwebdir | |
127 |
self.repoviewmaker = |
|
127 | self.repoviewmaker = hgweb | |
128 |
|
128 | |||
129 | def make_and_run_handler(self, req): |
|
129 | def make_and_run_handler(self, req): | |
130 | if self.webdir_conf: |
|
130 | if self.webdir_conf: |
General Comments 0
You need to be logged in to leave comments.
Login now