Mercurial > hg
diff hgwebdir.cgi @ 5566:d74fc8dec2b4
Less indirection in the WSGI web interface. This simplifies some code, and makes it more compliant with WSGI.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 30 Nov 2007 18:23:18 +0100 |
parents | 79279b5583c6 |
children | b913d3aacddc |
line wrap: on
line diff
--- a/hgwebdir.cgi Wed Nov 28 13:58:31 2007 -0800 +++ b/hgwebdir.cgi Fri Nov 30 18:23:18 2007 +0100 @@ -22,7 +22,6 @@ #os.environ["HGENCODING"] = "UTF-8" from mercurial.hgweb.hgwebdir_mod import hgwebdir -from mercurial.hgweb.request import wsgiapplication import mercurial.hgweb.wsgicgi as wsgicgi # The config file looks like this. You can have paths to individual @@ -44,7 +43,5 @@ # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples # or use a dictionary with entries like 'virtual/path': '/real/path' -def make_web_app(): - return hgwebdir("hgweb.config") - -wsgicgi.launch(wsgiapplication(make_web_app)) +application = hgwebdir('hgweb.config') +wsgicgi.launch(application)