Lepší adresa: http://hg.frantovo.cz/mercurial/hg
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 16 Feb 2009 19:05:26 +0100
changeset 297e5b3d7c945
parent 1 4bec1ea05529
child 3 40312bcd7cd2
Lepší adresa: http://hg.frantovo.cz/mercurial/hg
java/hg-projekty/web/WEB-INF/cgi/hg
java/hg-projekty/web/WEB-INF/cgi/hgweb.cgi
java/hg-projekty/web/WEB-INF/web.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/hg-projekty/web/WEB-INF/cgi/hg	Mon Feb 16 19:05:26 2009 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +#!/usr/bin/env python
     1.5 +#
     1.6 +# An example CGI script to use hgweb, edit as necessary
     1.7 +
     1.8 +# adjust python path if not a system-wide install:
     1.9 +#import sys
    1.10 +#sys.path.insert(0, "/path/to/python/lib")
    1.11 +
    1.12 +# enable importing on demand to reduce startup time
    1.13 +from mercurial import demandimport; demandimport.enable()
    1.14 +
    1.15 +# Uncomment to send python tracebacks to the browser if an error occurs:
    1.16 +import cgitb
    1.17 +cgitb.enable()
    1.18 +
    1.19 +# If you'd like to serve pages with UTF-8 instead of your default
    1.20 +# locale charset, you can do so by uncommenting the following lines.
    1.21 +# Note that this will cause your .hgrc files to be interpreted in
    1.22 +# UTF-8 and all your repo files to be displayed using UTF-8.
    1.23 +#
    1.24 +import os
    1.25 +os.environ["HGENCODING"] = "UTF-8"
    1.26 +
    1.27 +from mercurial.hgweb.hgweb_mod import hgweb
    1.28 +import mercurial.hgweb.wsgicgi as wsgicgi
    1.29 +
    1.30 +application = hgweb("/var/hg/projekty/pokus", "Pokus")
    1.31 +wsgicgi.launch(application)
     2.1 --- a/java/hg-projekty/web/WEB-INF/cgi/hgweb.cgi	Mon Feb 16 18:59:16 2009 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,28 +0,0 @@
     2.4 -#!/usr/bin/env python
     2.5 -#
     2.6 -# An example CGI script to use hgweb, edit as necessary
     2.7 -
     2.8 -# adjust python path if not a system-wide install:
     2.9 -#import sys
    2.10 -#sys.path.insert(0, "/path/to/python/lib")
    2.11 -
    2.12 -# enable importing on demand to reduce startup time
    2.13 -from mercurial import demandimport; demandimport.enable()
    2.14 -
    2.15 -# Uncomment to send python tracebacks to the browser if an error occurs:
    2.16 -import cgitb
    2.17 -cgitb.enable()
    2.18 -
    2.19 -# If you'd like to serve pages with UTF-8 instead of your default
    2.20 -# locale charset, you can do so by uncommenting the following lines.
    2.21 -# Note that this will cause your .hgrc files to be interpreted in
    2.22 -# UTF-8 and all your repo files to be displayed using UTF-8.
    2.23 -#
    2.24 -import os
    2.25 -os.environ["HGENCODING"] = "UTF-8"
    2.26 -
    2.27 -from mercurial.hgweb.hgweb_mod import hgweb
    2.28 -import mercurial.hgweb.wsgicgi as wsgicgi
    2.29 -
    2.30 -application = hgweb("/var/hg/projekty/pokus", "Pokus")
    2.31 -wsgicgi.launch(application)
     3.1 --- a/java/hg-projekty/web/WEB-INF/web.xml	Mon Feb 16 18:59:16 2009 +0100
     3.2 +++ b/java/hg-projekty/web/WEB-INF/web.xml	Mon Feb 16 19:05:26 2009 +0100
     3.3 @@ -15,7 +15,7 @@
     3.4      </servlet>
     3.5      <servlet-mapping>
     3.6          <servlet-name>cgi</servlet-name>
     3.7 -        <url-pattern>/cgi-bin/*</url-pattern>
     3.8 +        <url-pattern>/mercurial/*</url-pattern>
     3.9      </servlet-mapping>
    3.10      <session-config>
    3.11          <session-timeout>