Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 5835:bd34f0ac3cb0
adding "prefix" option to "hg serve" (command line and [web] section)
allows "hg serve" to serve from a different path than '/' (server root)
author | Michele Cella <michele.cella@gmail.com> |
---|---|
date | Wed, 09 Jan 2008 11:15:00 +0100 |
parents | 180a3eee4b75 |
children | a76395713691 |
comparison
equal
deleted
inserted
replaced
5834:5e7a8ea375a6 | 5835:bd34f0ac3cb0 |
---|---|
2391 " (.hg not found)")) | 2391 " (.hg not found)")) |
2392 s = sshserver.sshserver(ui, repo) | 2392 s = sshserver.sshserver(ui, repo) |
2393 s.serve_forever() | 2393 s.serve_forever() |
2394 | 2394 |
2395 parentui = ui.parentui or ui | 2395 parentui = ui.parentui or ui |
2396 optlist = ("name templates style address port ipv6" | 2396 optlist = ("name templates style address port prefix ipv6" |
2397 " accesslog errorlog webdir_conf certificate") | 2397 " accesslog errorlog webdir_conf certificate") |
2398 for o in optlist.split(): | 2398 for o in optlist.split(): |
2399 if opts[o]: | 2399 if opts[o]: |
2400 parentui.setconfig("web", o, str(opts[o])) | 2400 parentui.setconfig("web", o, str(opts[o])) |
2401 if (repo is not None) and (repo.ui != parentui): | 2401 if (repo is not None) and (repo.ui != parentui): |
3022 ('d', 'daemon', None, _('run server in background')), | 3022 ('d', 'daemon', None, _('run server in background')), |
3023 ('', 'daemon-pipefds', '', _('used internally by daemon mode')), | 3023 ('', 'daemon-pipefds', '', _('used internally by daemon mode')), |
3024 ('E', 'errorlog', '', _('name of error log file to write to')), | 3024 ('E', 'errorlog', '', _('name of error log file to write to')), |
3025 ('p', 'port', 0, _('port to use (default: 8000)')), | 3025 ('p', 'port', 0, _('port to use (default: 8000)')), |
3026 ('a', 'address', '', _('address to use')), | 3026 ('a', 'address', '', _('address to use')), |
3027 ('', 'prefix', '', _('prefix path to serve from (default: server root)')), | |
3027 ('n', 'name', '', | 3028 ('n', 'name', '', |
3028 _('name to show in web pages (default: working dir)')), | 3029 _('name to show in web pages (default: working dir)')), |
3029 ('', 'webdir-conf', '', _('name of the webdir config file' | 3030 ('', 'webdir-conf', '', _('name of the webdir config file' |
3030 ' (serve more than one repo)')), | 3031 ' (serve more than one repo)')), |
3031 ('', 'pid-file', '', _('name of file to write process ID to')), | 3032 ('', 'pid-file', '', _('name of file to write process ID to')), |