# HG changeset patch # User Dirkjan Ochtman # Date 1196586746 -3600 # Node ID f429e0e067a8070fe40bd4174d46e95a461ad2cd # Parent e15f7db0f0eebc359cc6da5dd6f199f02a326130 Fix style nit and add some comments to tests. diff -r e15f7db0f0ee -r f429e0e067a8 mercurial/hgweb/wsgicgi.py --- a/mercurial/hgweb/wsgicgi.py Sat Dec 01 19:19:08 2007 +0100 +++ b/mercurial/hgweb/wsgicgi.py Sun Dec 02 10:12:26 2007 +0100 @@ -16,9 +16,7 @@ util.set_binary(sys.stdout) environ = dict(os.environ.items()) - if 'PATH_INFO' not in environ: - environ['PATH_INFO'] = '' - + environ.setdefault('PATH_INFO', '') environ['wsgi.input'] = sys.stdin environ['wsgi.errors'] = sys.stderr environ['wsgi.version'] = (1, 0) diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-hgweb --- a/tests/test-hgweb Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-hgweb Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,5 @@ #!/bin/sh +# Some tests for hgweb. Tests static files, plain files and different 404's. hg init test cd test diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-hgweb-no-request-uri --- a/tests/test-hgweb-no-request-uri Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-hgweb-no-request-uri Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,7 @@ #!/bin/sh +# This tests if hgweb and hgwebdir still work if the REQUEST_URI variable is +# no longer passed with the request. Instead, SCRIPT_NAME and PATH_INFO +# should be used from d74fc8dec2b4 onward to route the request. mkdir repo cd repo diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-hgwebdir --- a/tests/test-hgwebdir Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-hgwebdir Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,6 @@ #!/bin/sh +# Tests some basic hgwebdir functionality. Tests setting up paths and +# collection, different forms of 404s and the subdirectory support. mkdir webdir cd webdir diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-newcgi --- a/tests/test-newcgi Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-newcgi Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,6 @@ #!/bin/sh +# This tests if CGI files from after d0db3462d568 but +# before d74fc8dec2b4 still work. hg init test diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-newercgi --- a/tests/test-newercgi Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-newercgi Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,5 @@ #!/bin/sh +# This is a rudimentary test of the CGI files as of d74fc8dec2b4. hg init test diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-non-interactive-wsgi --- a/tests/test-non-interactive-wsgi Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-non-interactive-wsgi Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,6 @@ #!/bin/sh +# Tests if hgweb can run without touching sys.stdin, as is required +# by the WSGI standard and strictly implemented by mod_wsgi. mkdir repo cd repo diff -r e15f7db0f0ee -r f429e0e067a8 tests/test-oldcgi --- a/tests/test-oldcgi Sat Dec 01 19:19:08 2007 +0100 +++ b/tests/test-oldcgi Sun Dec 02 10:12:26 2007 +0100 @@ -1,4 +1,5 @@ #!/bin/sh +# This tests if CGI files from before d0db3462d568 still work. hg init test