changeset 2124:27fd8b7a6c51

Cleaned trailing whitespace in hgweb.py, removed command line shortcut for webdir-conf.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 25 Apr 2006 00:43:40 +0200
parents c0729a7f6f8a
children 3610d9468b1e
files mercurial/commands.py mercurial/hgweb.py
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2566,7 +2566,8 @@ def serve(ui, repo, **opts):
                 r = repo.addchangegroup(fin)
                 respond(str(r))
 
-    optlist = "name templates style address port ipv6 accesslog errorlog webdir_conf"
+    optlist = """name templates style address port
+                 ipv6 accesslog errorlog webdir_conf"""
     for o in optlist.split():
         if opts[o]:
             ui.setconfig("web", o, opts[o])
@@ -3127,7 +3128,8 @@ table = {
           ('a', 'address', '', _('address to use')),
           ('n', 'name', '',
            _('name to show in web pages (default: working dir)')),
-          ('D', 'webdir-conf', '', _('name of the webdir config file (serve more than one repo)')),
+          ('', 'webdir-conf', '', _('name of the webdir config file'
+                                    ' (serve more than one repo)')),
           ('', 'pid-file', '', _('name of file to write process ID to')),
           ('', 'stdio', None, _('for remote clients')),
           ('t', 'templates', '', _('web templates to use')),
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -891,7 +891,7 @@ class hgweb(object):
 
 def create_server(repo):
     use_threads = True
-    
+
     def openlog(opt, default):
         if opt and opt != '-':
             return open(opt, 'w')
@@ -903,7 +903,7 @@ def create_server(repo):
     webdir_conf = repo.ui.config("web", "webdir_conf")
     accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout)
     errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr)
-    
+
     if use_threads:
         try:
             from threading import activeCount
@@ -920,7 +920,7 @@ def create_server(repo):
 
     class MercurialHTTPServer(_mixin, BaseHTTPServer.HTTPServer):
         pass
-    
+
     class IPv6HTTPServer(MercurialHTTPServer):
         address_family = getattr(socket, 'AF_INET6', None)
 
@@ -953,7 +953,7 @@ def create_server(repo):
 
         def do_hgweb(self):
             path_info, query = splitURI(self.path)
-            
+
             env = {}
             env['GATEWAY_INTERFACE'] = 'CGI/1.1'
             env['REQUEST_METHOD'] = self.command
@@ -991,7 +991,7 @@ def create_server(repo):
             else:
                 hgwebobj = hgweb(repo.__class__(repo.ui, repo.origroot))
             hgwebobj.run(req)
- 
+
 
     if use_ipv6:
         return IPv6HTTPServer((address, port), hgwebhandler)