mercurial/hgweb.py
changeset 1964 778281d46bb2
parent 1920 b7cc0f323a4c
child 2095 0bf2a9e5eff1
equal deleted inserted replaced
1963:39eb64b23cb5 1964:778281d46bb2
   795         if not self.reponame:
   795         if not self.reponame:
   796             self.reponame = (self.repo.ui.config("web", "name")
   796             self.reponame = (self.repo.ui.config("web", "name")
   797                              or uri.strip('/') or self.repo.root)
   797                              or uri.strip('/') or self.repo.root)
   798 
   798 
   799         self.t = templater.templater(m, templater.common_filters,
   799         self.t = templater.templater(m, templater.common_filters,
   800                                      {"url": url,
   800                                      defaults={"url": url,
   801                                       "repo": self.reponame,
   801                                                "repo": self.reponame,
   802                                       "header": header,
   802                                                "header": header,
   803                                       "footer": footer,
   803                                                "footer": footer,
   804                                       })
   804                                                })
   805 
   805 
   806         if not req.form.has_key('cmd'):
   806         if not req.form.has_key('cmd'):
   807             req.form['cmd'] = [self.t.cache['default'],]
   807             req.form['cmd'] = [self.t.cache['default'],]
   808 
   808 
   809         if req.form['cmd'][0] == 'changelog':
   809         if req.form['cmd'][0] == 'changelog':
  1028         def footer(**map):
  1028         def footer(**map):
  1029             yield tmpl("footer", **map)
  1029             yield tmpl("footer", **map)
  1030 
  1030 
  1031         m = os.path.join(templater.templatepath(), "map")
  1031         m = os.path.join(templater.templatepath(), "map")
  1032         tmpl = templater.templater(m, templater.common_filters,
  1032         tmpl = templater.templater(m, templater.common_filters,
  1033                                    {"header": header, "footer": footer})
  1033                                    defaults={"header": header,
       
  1034                                              "footer": footer})
  1034 
  1035 
  1035         def entries(**map):
  1036         def entries(**map):
  1036             parity = 0
  1037             parity = 0
  1037             for name, path in self.repos:
  1038             for name, path in self.repos:
  1038                 u = ui.ui()
  1039                 u = ui.ui()