mercurial/hgweb/hgwebdir_mod.py
changeset 7966 aa983c3d94a9
parent 7948 de377b1a9a84
child 8136 6b5522cb2ad2
equal deleted inserted replaced
7965:8503adbd9d49 7966:aa983c3d94a9
     7 # of the GNU General Public License, incorporated herein by reference.
     7 # of the GNU General Public License, incorporated herein by reference.
     8 
     8 
     9 import os
     9 import os
    10 from mercurial.i18n import _
    10 from mercurial.i18n import _
    11 from mercurial import ui, hg, util, templater, templatefilters, error, encoding
    11 from mercurial import ui, hg, util, templater, templatefilters, error, encoding
    12 from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\
    12 from common import ErrorResponse, get_mtime, staticfile, paritygen,\
    13                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
    13                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
    14 from hgweb_mod import hgweb
    14 from hgweb_mod import hgweb
    15 from request import wsgirequest
    15 from request import wsgirequest
    16 
    16 
    17 # This is a stopgap
    17 # This is a stopgap
   315             style = config('web', 'style', '')
   315             style = config('web', 'style', '')
   316         if 'style' in req.form:
   316         if 'style' in req.form:
   317             style = req.form['style'][0]
   317             style = req.form['style'][0]
   318         if self.stripecount is None:
   318         if self.stripecount is None:
   319             self.stripecount = int(config('web', 'stripes', 1))
   319             self.stripecount = int(config('web', 'stripes', 1))
   320         mapfile = style_map(templater.templatepath(), style)
   320         mapfile = templater.stylemap(style)
   321         tmpl = templater.templater(mapfile, templatefilters.filters,
   321         tmpl = templater.templater(mapfile, templatefilters.filters,
   322                                    defaults={"header": header,
   322                                    defaults={"header": header,
   323                                              "footer": footer,
   323                                              "footer": footer,
   324                                              "motd": motd,
   324                                              "motd": motd,
   325                                              "url": url,
   325                                              "url": url,