hg site extension
 
(Arne Babenhauserheide)
2011-11-24: FIX regression: paths in the log output on the overview were

FIX regression: paths in the log output on the overview were incorrect.

diff --git a/site.py b/site.py
--- a/site.py
+++ b/site.py
@@ -60,8 +60,7 @@ templates = {
     "manifesthead": """<h2>""" + _("Commit")+""": <a href='../../commit/{hex}.html'>{hex}</a></h2>
 <p>{desc}</p><p>{user}</p>
     <h2>""" + _("Files in this revision") + "</h2>", 
-    "commitlog": """<div style='float: right; padding-left: 0.5em'><em>({author|person})</em></div><strong> {date|shortdate}: <a href='../src/{node}/'>{desc|strip|fill68|firstline}</a></strong> <span style='font-size: xx-small'>{branches} {tags} {bookmarks}</span><p>{desc|escape}</p>\n"""
-
+    "commitlog": """<div style='float: right; padding-left: 0.5em'><em>({author|person})</em></div><strong> {date|shortdate}: <a href='{relativepath}src/{node}/'>{desc|strip|fill68|firstline}</a></strong> <span style='font-size: xx-small'>{branches} {tags} {bookmarks}</span><p>{desc|escape}</p>\n"""
 }
 
 _indexregexp = re.compile("^\\.*index.html$")
@@ -107,7 +106,7 @@ def writeoverview(ui, repo, target, name
     overview += "\n<h2>Changes (<a href='commits'>full changelog</a>)</h2>\n"
     ui.pushbuffer()
     t = cmdutil.changeset_templater(ui, repo, patch=False, diffopts=None, mapfile=None, buffered=False)
-    t.use_template(templates["commitlog"])
+    t.use_template(templates["commitlog"].replace("{relativepath}", ""))
     for c in range(1, min(len(repo.changelog), 5)):
         ctx = repo.changectx(str(-c))
         t.show(ctx)
@@ -137,7 +136,7 @@ def writelog(ui, repo, target, name):
 
     # create the log files
     t = cmdutil.changeset_templater(ui, repo, patch=False, diffopts=None, mapfile=None, buffered=False)
-    t.use_template(templates["commitlog"])
+    t.use_template(templates["commitlog"].replace("{relativepath}", "../"))
     logs = []
     for ck in range(len(repo.changelog)/100+1):
         ui.pushbuffer()