[PATCH 4 of 4] hgweb: remove now unnecessary explicit header() and footer()

Alexander Plavin alexander at plav.in
Fri Aug 2 16:39:15 CDT 2013


# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1374621626 -14400
#      Wed Jul 24 03:20:26 2013 +0400
# Node ID 11ac049356d4894642313803d9edc1ff2e9d2788
# Parent  1fe956e499f2996d4b63ae04c2ec99fe39e89302
hgweb: remove now unnecessary explicit header() and footer()

diff -r 1fe956e499f2 -r 11ac049356d4 mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Thu Jul 25 01:12:25 2013 +0400
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Jul 24 03:20:26 2013 +0400
@@ -331,12 +331,6 @@
 
         # some functions for the templater
 
-        def header(**map):
-            yield tmpl('header', encoding=encoding.encoding, **map)
-
-        def footer(**map):
-            yield tmpl("footer", **map)
-
         def motd(**map):
             yield self.config("web", "motd", "")
 
@@ -373,8 +367,7 @@
                                              "staticurl": staticurl,
                                              "urlbase": urlbase,
                                              "repo": self.reponame,
-                                             "header": header,
-                                             "footer": footer,
+                                             "encoding": encoding.encoding,
                                              "motd": motd,
                                              "sessionvars": sessionvars,
                                              "pathdef": makebreadcrumb(req.url),
diff -r 1fe956e499f2 -r 11ac049356d4 mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Jul 25 01:12:25 2013 +0400
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Jul 24 03:20:26 2013 +0400
@@ -408,12 +408,6 @@
 
     def templater(self, req):
 
-        def header(**map):
-            yield tmpl('header', encoding=encoding.encoding, **map)
-
-        def footer(**map):
-            yield tmpl("footer", **map)
-
         def motd(**map):
             if self.motd is not None:
                 yield self.motd
@@ -448,8 +442,7 @@
             staticurl += '/'
 
         tmpl = templater.templater(mapfile,
-                                   defaults={"header": header,
-                                             "footer": footer,
+                                   defaults={"encoding": encoding.encoding,
                                              "motd": motd,
                                              "url": url,
                                              "logourl": logourl,


More information about the Mercurial-devel mailing list