Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 2392:8238a3f039e6
Adjusting hgweb splitup to be a little cleaner.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Fri, 02 Jun 2006 08:25:02 -0700 |
parents | 482d3fb47d80 |
children | 8d44649df03b |
comparison
equal
deleted
inserted
replaced
2391:d351a3be3371 | 2392:8238a3f039e6 |
---|---|
11 demandload(globals(), "os re sys signal shutil imp urllib pdb") | 11 demandload(globals(), "os re sys signal shutil imp urllib pdb") |
12 demandload(globals(), "fancyopts ui hg util lock revlog templater bundlerepo") | 12 demandload(globals(), "fancyopts ui hg util lock revlog templater bundlerepo") |
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(), "mercurial.hgweb.server:create_server") | 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.""" |
21 class AmbiguousCommand(Exception): | 20 class AmbiguousCommand(Exception): |
22 """Exception raised if command shortcut matches more than one command.""" | 21 """Exception raised if command shortcut matches more than one command.""" |
2542 os.close(wfd) | 2541 os.close(wfd) |
2543 os.read(rfd, 1) | 2542 os.read(rfd, 1) |
2544 os._exit(0) | 2543 os._exit(0) |
2545 | 2544 |
2546 try: | 2545 try: |
2547 httpd = create_server(ui, repo, hgwebdir, hgweb) | 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 |
2551 if ui.verbose: | 2550 if ui.verbose: |
2552 addr, port = httpd.socket.getsockname() | 2551 addr, port = httpd.socket.getsockname() |