--- a/mercurial/hgweb/hgweb_mod.py Wed Sep 27 09:10:29 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py Wed Sep 27 09:10:31 2006 -0700
@@ -398,16 +398,16 @@
def annotate(**map):
parity = 0
last = None
- for f, l in fctx.annotate():
- cnode = f.node()
+ for f, l in fctx.annotate(follow=True):
+ fnode = f.filenode()
name = self.repo.ui.shortuser(f.user())
- if last != cnode:
+ if last != fnode:
parity = 1 - parity
- last = cnode
+ last = fnode
yield {"parity": parity,
- "node": hex(cnode),
+ "node": hex(fnode),
"rev": f.rev(),
"author": name,
"file": f.path(),
--- a/templates/map Wed Sep 27 09:10:29 2006 -0700
+++ b/templates/map Wed Sep 27 09:10:31 2006 -0700
@@ -22,7 +22,7 @@
filelog = filelog.tmpl
fileline = '<div class="parity#parity#"><span class="lineno">#linenumber#</span>#line|escape#</div>'
filelogentry = filelogentry.tmpl
-annotateline = '<tr class="parity#parity#"><td class="annotate"><a href="?cs=#node|short#">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'
+annotateline = '<tr class="parity#parity#"><td class="annotate"><a href="?fa=#node|short#;file=#file|urlescape#">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'
difflineplus = '<span class="plusline">#line|escape#</span>'
difflineminus = '<span class="minusline">#line|escape#</span>'
difflineat = '<span class="atline">#line|escape#</span>'
--- a/templates/map-gitweb Wed Sep 27 09:10:29 2006 -0700
+++ b/templates/map-gitweb Wed Sep 27 09:10:31 2006 -0700
@@ -20,7 +20,7 @@
fileannotate = fileannotate-gitweb.tmpl
filelog = filelog-gitweb.tmpl
fileline = '<div style="font-family:monospace" class="parity#parity#"><pre><span class="linenr"> #linenumber#</span> #line|escape#</pre></div>'
-annotateline = '<tr style="font-family:monospace" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="?cs=#node|short#;style=gitweb">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'
+annotateline = '<tr style="font-family:monospace" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="?fa=#node|short#;file=#file|urlescape#;style=gitweb">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'
difflineplus = '<div style="color:#008800;">#line|escape#</div>'
difflineminus = '<div style="color:#cc0000;">#line|escape#</div>'
difflineat = '<div style="color:#990099;">#line|escape#</div>'