[PATCH] hgweb/localrepo: pass the request object to hooks

Sune Foldager cryo at cyanite.org
Fri Nov 6 17:58:49 CST 2009


Dirkjan et al., how about this:

The ui class could carry an 'environ', which would default to returning
os.environ. Hgweb, which creates an ui, could then set wsgireq.environ
as the ui's environ, which would closer resemble the correct environment
during processeing (for CGI, wsgireq.environ again equals os.environ I
think).

All hooks have access to the ui instance, and the problem would be
solved :-). Also much nicer than my previous suggestions.

/Sune


More information about the Mercurial-devel mailing list