Add support for regexp-based replacing.
config.py.sample
Mon Dec 25 22:18:20 UTC 2006 Alberto Bertogli <albertito@gmail.com>
* Add support for regexp-based replacing.
Add an option to replace text in the summary, using regexps. This allows you
to configure darcsweb to automatically detect and put links to other commits
or bug numbers.
This patch is heavily based on the one written by Kirill Smelkov
(kirr@mns.spb.ru).
--- old-darcsweb/config.py.sample 2015-10-09 14:36:28.000000000 +0000
+++ new-darcsweb/config.py.sample 2015-10-09 14:36:28.000000000 +0000
@@ -55,6 +55,26 @@
# darcsweb.
#logtimes = "/tmp/darcsweb_times"
+ # If you want darcsweb to automatically detect embedded URLs,
+ # define them here, using python-style regexps like the examples
+ # below. They will be replaced in summaries, logs, and commits.
+ # The following variables are replaced:
+ # myreponame: repository link (darcsweb.cgi?r=repo)
+ # reponame: repository name (repo)
+ #
+ #url_links = (
+ # Format is: (regexp, replacement)
+ # Some examples:
+ #
+ # Detect '#NNN' as a reference to bug database
+ #(r'#([0-9]+)',
+ # r'<a href="/bugs/show_bug.cgi?id=\1">#\1</a>'),
+ #
+ # Replace hashes with commit-links.
+ #(r'(\d{14}-[0-9a-f]{5}-[0-9a-f]{40}\.gz)',
+ # r'<a href="%(myreponame)s;a=commit;h=\1">\1</a>'),
+ #)
+
#
# From now on, every class is a repo configuration, with the same format