[PATCH] fix: hgweb.fcgi does not work under windows platform (issue1917)

Matt Mackall mpm at selenic.com
Tue Feb 15 15:04:57 CST 2011


On Tue, 2011-02-15 at 19:09 +0800, Sh.W wrote:
> # HG changeset patch
> # User Sh.W <sharkke.w at gmail.com>
> # Date 1297767701 -28800
> # Node ID b436da44e5f7d26398b1b95bd01f8f701257ad30
> # Parent  12773f1b7728f0bfdd564fff1800ed99a40b3a6b
> fix: hgweb.fcgi does not work under windows platform (issue1917)

Can you explain what this is doing and why it's needed? It seems very
strange.

> diff -r 12773f1b7728 -r b436da44e5f7 contrib/hgweb.fcgi
> --- a/contrib/hgweb.fcgi	Mon Feb 14 18:04:20 2011 -0600
> +++ b/contrib/hgweb.fcgi	Tue Feb 15 19:01:41 2011 +0800
> @@ -14,5 +14,16 @@
>  from mercurial import demandimport; demandimport.enable()
>  from mercurial.hgweb import hgweb
>  from flup.server.fcgi import WSGIServer
> +import sys
> +
>  application = hgweb(config)
> -WSGIServer(application).run()
> +if sys.platform == "win32":
> +    wsgi_opts = {
> +            'maxSpare': 5,
> +            'minSpare': 2,
> +            'maxThreads': 50,
> +            'bindAddress': ('127.0.0.1', 8091),
> +    }
> +    WSGIServer(application, **wsgi_opts).run()
> +else:
> +    WSGIServer(application).run()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list