Tue Nov 1 08:30:12 UTC 2011 pinterface <pix@kepibu.org>
* Add ability to specify a mailing list URL for repositories
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2013-07-18 20:22:59.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2013-07-18 20:22:59.000000000 +0000
@@ -1485,6 +1485,10 @@
print ' <tr><td>project url</td>'
print ' <td><a href="%(url)s">%(url)s</a></td></tr>' % \
{ 'url': config.repoprojurl }
+ if config.repolisturl:
+ print ' <tr><td>mailing list url</td>'
+ print ' <td><a href="%(url)s">%(url)s</a></td></tr>' % \
+ { 'url': config.repolisturl }
print '</table>'
print_shortlog(15)
@@ -2371,6 +2375,20 @@
else:
projurl = None
+ if 'autolisturl' in dir(c) and c.autolisturl:
+ dpath = fulldir + \
+ '/_darcs/third_party/darcsweb/listurl'
+ if os.access(dpath, os.R_OK):
+ listurl = open(dpath).readline().rstrip("\n")
+ elif 'repolisturl' in dir(c):
+ listurl = c.repolisturl % rep_dict
+ else:
+ listurl = None
+ elif 'repolisturl' in dir(c):
+ listurl = c.repolisturl % rep_dict
+ else:
+ listurl = None
+
rdir = fulldir
class tmp_config:
reponame = dname
@@ -2379,6 +2397,7 @@
repourl = url
repoencoding = c.repoencoding
repoprojurl = projurl
+ repolisturl = listurl
if 'footer' in dir(c):
footer = c.footer
@@ -2441,6 +2460,10 @@
if 'repoprojurl' in dir(c):
config.repoprojurl = c.repoprojurl
+ config.repolisturl = None
+ if 'repolisturl' in dir(c):
+ config.repolisturl = c.repolisturl
+
# repoencoding must be a tuple
if isinstance(c.repoencoding, str):
config.repoencoding = (c.repoencoding, )