Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/hgwebdir_mod.py @ 7948:de377b1a9a84
move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 03 Apr 2009 14:51:48 -0500 |
parents | 176d3d681702 |
children | aa983c3d94a9 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Fri Apr 03 13:20:52 2009 -0500 +++ b/mercurial/hgweb/hgwebdir_mod.py Fri Apr 03 14:51:48 2009 -0500 @@ -8,7 +8,7 @@ import os from mercurial.i18n import _ -from mercurial import ui, hg, util, templater, templatefilters, error +from mercurial import ui, hg, util, templater, templatefilters, error, encoding from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\ get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR from hgweb_mod import hgweb @@ -119,7 +119,7 @@ virtual = req.env.get("PATH_INFO", "").strip('/') tmpl = self.templater(req) - ctype = tmpl('mimetype', encoding=util._encoding) + ctype = tmpl('mimetype', encoding=encoding.encoding) ctype = templater.stringify(ctype) # a static file @@ -285,7 +285,7 @@ def templater(self, req): def header(**map): - yield tmpl('header', encoding=util._encoding, **map) + yield tmpl('header', encoding=encoding.encoding, **map) def footer(**map): yield tmpl("footer", **map)