hgweb: forgot to centralize the req.write() calls in hgwebdir
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Mon, 28 Jan 2008 16:35:02 +0100
changeset 5965 abe373e16fe6
parent 5964 1cd1582ef25f
child 5966 11af38a592ae
hgweb: forgot to centralize the req.write() calls in hgwebdir
mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py	Mon Jan 28 15:10:17 2008 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Mon Jan 28 16:35:02 2008 +0100
@@ -90,7 +90,7 @@
                 # top-level index
                 elif not virtual:
                     tmpl = self.templater(req)
-                    self.makeindex(req, tmpl)
+                    req.write(self.makeindex(req, tmpl))
                     return
 
                 # nested indexes and hgwebs
@@ -112,7 +112,7 @@
                     subdir = virtual + '/'
                     if [r for r in repos if r.startswith(subdir)]:
                         tmpl = self.templater(req)
-                        self.makeindex(req, tmpl, subdir)
+                        req.write(self.makeindex(req, tmpl, subdir))
                         return
 
                     up = virtual.rfind('/')
@@ -227,9 +227,9 @@
                             and "-" or "", column))
                 for column in sortable]
 
-        req.write(tmpl("index", entries=entries, subdir=subdir,
-                       sortcolumn=sortcolumn, descending=descending,
-                       **dict(sort)))
+        return tmpl("index", entries=entries, subdir=subdir,
+                    sortcolumn=sortcolumn, descending=descending,
+                    **dict(sort))
 
     def templater(self, req):