Tue Nov 1 08:30:12 UTC 2011 pinterface * 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 2014-09-11 07:39:14.000000000 +0000 +++ new-darcsweb/darcsweb.cgi 2014-09-11 07:39:14.000000000 +0000 @@ -1485,6 +1485,10 @@ print ' project url' print ' %(url)s' % \ { 'url': config.repoprojurl } + if config.repolisturl: + print ' mailing list url' + print ' %(url)s' % \ + { 'url': config.repolisturl } print '' 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, )