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).
{
hunk ./darcsweb.cgi 977
+ prevhash = None
hunk ./darcsweb.cgi 988
+
+ 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" % ""
+
hunk ./darcsweb.cgi 1011
+<a href="%(link)s" title="%(title)s" class="annotate_desc">%(date)s %(desc)s</a> \
hunk ./darcsweb.cgi 1016
+ 'date': date,
+ 'desc': desc,
hunk ./style.css 195
- right:12px
+ right:12px;
hunk ./style.css 200
- text-decoration:none
+ text-decoration:none;
+}
+
+a.annotate_desc {
+ color:#999999;
+ text-decoration:none;
+ font-size:11px;
+}
+
+a.annotate_desc:hover {
+ color:#880000;
}