# HG changeset patch # User mpm@selenic.com # Date 1119027011 28800 # Node ID 5f65a108a55957118b5b95e3e38449f451221d0e # Parent 50aea13227a21b7e30bfd97b4b4402e386c437c2 hgweb: pull cgitb into CGI script example, where it can easily be disabled -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hgweb: pull cgitb into CGI script example, where it can easily be disabled This also eliminates cgitb dumps in the logging output of hg serve manifest hash: a0aa07a706c2c388c0b49505e2960197f716920c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsv9DywK+sNU5EO8RAieFAJwOjdfkz7pILNVUTvpMkRa6/OIhIQCgo2TP I2E4hxQ0N7mTtl45pXEFLsk= =tG0v -----END PGP SIGNATURE----- diff --git a/hgweb.cgi b/hgweb.cgi --- a/hgweb.cgi +++ b/hgweb.cgi @@ -3,6 +3,8 @@ # 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 diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -6,10 +6,6 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. -# useful for debugging -import cgitb -cgitb.enable() - import os, cgi, time, re, difflib, sys, zlib from mercurial.hg import * from mercurial.ui import *