Show More
@@ -636,7 +636,8 b' class hgweb(object):' | |||||
636 |
|
636 | |||
637 | def annotate(**map): |
|
637 | def annotate(**map): | |
638 | last = None |
|
638 | last = None | |
639 |
|
|
639 | lines = enumerate(fctx.annotate(follow=True, linenumber=True)) | |
|
640 | for lineno, ((f, targetline), l) in lines: | |||
640 | fnode = f.filenode() |
|
641 | fnode = f.filenode() | |
641 | name = self.repo.ui.shortuser(f.user()) |
|
642 | name = self.repo.ui.shortuser(f.user()) | |
642 |
|
643 | |||
@@ -648,6 +649,7 b' class hgweb(object):' | |||||
648 | "rev": f.rev(), |
|
649 | "rev": f.rev(), | |
649 | "author": name, |
|
650 | "author": name, | |
650 | "file": f.path(), |
|
651 | "file": f.path(), | |
|
652 | "targetline": targetline, | |||
651 | "line": l, |
|
653 | "line": l, | |
652 | "lineid": "l%d" % (lineno + 1), |
|
654 | "lineid": "l%d" % (lineno + 1), | |
653 | "linenumber": "% 6d" % (lineno + 1)} |
|
655 | "linenumber": "% 6d" % (lineno + 1)} |
@@ -24,7 +24,7 b' fileannotate = fileannotate.tmpl' | |||||
24 | filediff = filediff.tmpl |
|
24 | filediff = filediff.tmpl | |
25 | filelog = filelog.tmpl |
|
25 | filelog = filelog.tmpl | |
26 | fileline = '<div style="font-family:monospace" class="parity#parity#"><pre><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</pre></div>' |
|
26 | fileline = '<div style="font-family:monospace" class="parity#parity#"><pre><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</pre></div>' | |
27 | annotateline = '<tr style="font-family:monospace" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#author|obfuscate#@#rev#</a></td><td><pre><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a></pre></td><td><pre>#line|escape#</pre></td></tr>' |
|
27 | annotateline = '<tr style="font-family:monospace" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}#l{targetline}">#author|obfuscate#@#rev#</a></td><td><pre><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a></pre></td><td><pre>#line|escape#</pre></td></tr>' | |
28 | difflineplus = '<span style="color:#008800;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' |
|
28 | difflineplus = '<span style="color:#008800;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' | |
29 | difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' |
|
29 | difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' | |
30 | difflineat = '<span style="color:#990099;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' |
|
30 | difflineat = '<span style="color:#990099;"><a class="linenr" href="##lineid#" id="#lineid#">#linenumber#</a> #line|escape#</span>' |
@@ -24,7 +24,7 b' filediff = filediff.tmpl' | |||||
24 | filelog = filelog.tmpl |
|
24 | filelog = filelog.tmpl | |
25 | fileline = '<div class="parity#parity#"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</div>' |
|
25 | fileline = '<div class="parity#parity#"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</div>' | |
26 | filelogentry = filelogentry.tmpl |
|
26 | filelogentry = filelogentry.tmpl | |
27 | annotateline = '<tr class="parity#parity#"><td class="annotate"><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#author|obfuscate#@#rev#</a></td><td><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a></td><td><pre>#line|escape#</pre></td></tr>' |
|
27 | annotateline = '<tr class="parity#parity#"><td class="annotate"><a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}#l{targetline}">#author|obfuscate#@#rev#</a></td><td><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a></td><td><pre>#line|escape#</pre></td></tr>' | |
28 | difflineplus = '<span class="plusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' |
|
28 | difflineplus = '<span class="plusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' | |
29 | difflineminus = '<span class="minusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' |
|
29 | difflineminus = '<span class="minusline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' | |
30 | difflineat = '<span class="atline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' |
|
30 | difflineat = '<span class="atline"><a class="lineno" href="##lineid#" id="#lineid#">#linenumber#</a>#line|escape#</span>' |
General Comments 0
You need to be logged in to leave comments.
Login now