$ cat >hgweb.cgi <<HGWEB
> #
> # An example CGI script to use hgweb, edit as necessary
- > import cgitb
- > cgitb.enable()
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgweb
> from mercurial.hgweb import wsgicgi
$ . "$TESTDIR/cgienv"
$ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING
- $ "$PYTHON" hgweb.cgi >page1 2>&1
+ $ "$PYTHON" hgweb.cgi >page1
$ "$PYTHON" "$TESTDIR/md5sum.py" page1
1f424bb22ec05c3c6bc866b6e67efe43 page1
> #
> # An example CGI script to use hgweb, edit as necessary
>
- > import cgitb
- > cgitb.enable()
- >
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgweb
> from mercurial.hgweb import wsgicgi
> #
> # An example CGI script to export multiple hgweb repos, edit as necessary
>
- > import cgitb
- > cgitb.enable()
- >
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgwebdir
> from mercurial.hgweb import wsgicgi
> #
> # An example CGI script to use hgweb, edit as necessary
>
- > import cgitb
- > cgitb.enable()
- >
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgweb
> from mercurial.hgweb import wsgicgi
> #
> # An example CGI script to export multiple hgweb repos, edit as necessary
>
- > import cgitb
- > cgitb.enable()
- >
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgwebdir
> from mercurial.hgweb import wsgicgi
> #
> # An example CGI script to use hgweb, edit as necessary
>
- > import cgitb, os, sys
- > cgitb.enable()
- >
> # sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
> from mercurial import hgweb
>
> #
> # An example CGI script to export multiple hgweb repos, edit as necessary
>
- > import cgitb, sys
- > cgitb.enable()
- >
> # sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install
> from mercurial import hgweb
>
create hgweb invocation script
$ cat >hgweb.cgi <<HGWEB
- > import cgitb
- > cgitb.enable()
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgweb
> from mercurial.hgweb import wsgicgi