Add Owner and Last Change columns to repo listing
Tue Nov 1 10:19:57 UTC 2011 pinterface <pix@kepibu.org>
* Add Owner and Last Change columns to repo listing
This is a little ugly due to the global config object. Boo.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2013-07-18 20:23:25.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2013-07-18 20:23:25.000000000 +0000
@@ -2244,6 +2244,8 @@
<tr>
<th>Project</th>
<th>Description</th>
+<th>Owner</th>
+<th>Last Change</th>
<th></th>
</tr>
""" % {
@@ -2268,9 +2270,14 @@
if alt: print '<tr class="dark">'
else: print '<tr class="light">'
alt = not alt
+ try: orig_repodir = config.repodir
+ except: orig_repodir = None
+ config.repodir = c.repodir
print """
<td><a class="list" href="%(myname)s?r=%(name)s;a=summary">%(dname)s</a></td>
<td>%(desc)s</td>
+<td>%(owner)s</td>
+<td>%(lastchange)s</td>
<td class="link"><a href="%(myname)s?r=%(name)s;a=summary">summary</a> |
<a href="%(myname)s?r=%(name)s;a=shortlog">shortlog</a> |
<a href="%(myname)s?r=%(name)s;a=log">log</a> |
@@ -2281,8 +2288,11 @@
'myname': config.myname,
'dname': name,
'name': urllib.quote(name),
- 'desc': shorten_str(desc, 60)
+ 'desc': shorten_str(desc, 60),
+ 'owner': escape(repo_get_owner() or ''),
+ 'lastchange': how_old(os.stat(c.repodir + '/_darcs/patches').st_mtime),
}
+ config.repodir = orig_repodir
print "</table>"
print_footer(put_rss = 0)