[PATCH 14 of 15] Example webdir FastCGI script
mpm at selenic.com
Wed Aug 24 18:01:31 CDT 2005
On Wed, Aug 24, 2005 at 11:49:22PM +0200, vincent at ricardis.tudelft.nl wrote:
> # HG changeset patch
> # User Vincent Wagelaar <vincent at ricardis.tudelft.nl>
> # Node ID d4383e2b77951df1466a776bccffaa628467166a
> # Parent b48e6d0b232a38560668b1c8be43cd5ab4b44ee5
> Example webdir FastCGI script
This patch by itself doesn't make sense.
The trick with patch series is that you want each patch to evolve the
code forward in an obvious, self-contained way. I should be able to
look at patch 1, say "ah, that seems obvious enough", apply it, run
it, etc., then look at patch 2..
> diff -r b48e6d0b232a -r d4383e2b7795 hgwebdir.fcgi
> --- /dev/null Tue Aug 23 22:32:19 2005
> +++ b/hgwebdir.fcgi Tue Aug 23 22:34:41 2005
> @@ -0,0 +1,26 @@
> +#!/usr/bin/env python
> +# An example FastCGI script to export multiple hgweb repos, edit as necessary
> +import sys
> +#sys.path.insert(0, "/path/to//lib/python") # if not a system-wide install
> +from mercurial import hgweb
> +from mercurial import thfcgi
> +web = hgweb.hgwebdir("/path/to/hgwebdir.conf")
> +def handle_req(req, env, form):
> + global web
Do you really need this global?
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial