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

Sh.W sharkke.w at gmail.com
Tue Feb 15 05:09:27 CST 2011


# 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)

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()


More information about the Mercurial-devel mailing list