Tue Sep 20 07:40:25 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Add patch description to print_annotate().
Add a column to the left of the annotate output, just before the line number,
to show the date (but not time) and author (in a short form).
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2014-05-04 01:29:42.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2014-05-04 01:29:42.000000000 +0000
@@ -974,6 +974,7 @@
return
count = 1
+ prevhash = None
for l in ann.lines:
text = escape(l.text)
text = text.rstrip()
@@ -984,12 +985,36 @@
'myrname': config.myreponame,
'hash': l.phash
}
+
+ if l.phash != prevhash:
+ pdate = time.strptime(l.pdate, "%Y-%m-%d %H:%M:%S")
+ pdate = time.strftime("%Y-%m-%d", pdate)
+
+ left = l.pauthor.find('<')
+ right = l.pauthor.find('@')
+ if left != -1 and right != -1:
+ shortau = l.pauthor[left + 1:right]
+ elif l.pauthor.find(" ") != -1:
+ shortau = l.pauthor[:l.pauthor.find(" ")]
+ else:
+ shortau = l.pauthor
+
+ desc = "%12.12s" % escape(shortau)
+ date = "%-10.10s" % pdate
+ prevhash = l.phash
+ else:
+ desc = "%12.12s" % "'"
+ date = "%-10.10s" % ""
+
print """\
<div class="pre">\
+<a href="%(link)s" title="%(title)s" class="annotate_desc">%(date)s %(desc)s</a> \
<a href="%(link)s" title="%(title)s" class="linenr">%(c)4d</a> \
<a href="%(link)s" title="%(title)s" class="line">%(text)s</a>\
</div>
""" % {
+ 'date': date,
+ 'desc': desc,
'c': count,
'text': text,
'title': title,
diff -rN -u old-darcsweb/style.css new-darcsweb/style.css
--- old-darcsweb/style.css 2014-05-04 01:29:42.000000000 +0000
+++ new-darcsweb/style.css 2014-05-04 01:29:42.000000000 +0000
@@ -192,12 +192,22 @@
margin:4px 8px;
position:absolute;
top:56px;
- right:12px
+ right:12px;
}
a.linenr {
color:#999999;
- text-decoration:none
+ text-decoration:none;
+}
+
+a.annotate_desc {
+ color:#999999;
+ text-decoration:none;
+ font-size:11px;
+}
+
+a.annotate_desc:hover {
+ color:#880000;
}
a.rss_logo {