Add autourl support for multidir.
Fri Jul 14 19:27:30 UTC 2006 Alberto Bertogli <albertogli@telpin.com.ar>
* Add autourl support for multidir.
This patch adds a new option for multidir config entries, named "autourl". If
set, it will take the contents of "_darcs/third_party/darcsweb/url" and use it
as repourl.
Thanks to Marco Baringer for suggestion and preliminary patch.
{
hunk ./config.py.sample 138
+ # if you want urls to be picked up automatically from the file named
+ # "_darcs/third_party/darcsweb/url" (one line only), set this to
+ # True. It defaults to False.
+ #autourl = True
hunk ./darcsweb.cgi 2188
+ if 'autourl' in dir(c) and c.autourl:
+ dpath = fulldir + \
+ '/_darcs/third_party/darcsweb/url'
+ if os.access(dpath, os.R_OK):
+ url = open(dpath).read()
+ else:
+ url = c.repourl % { 'name': name }
+ else:
+ url = c.repourl % { 'name': name }
+
hunk ./darcsweb.cgi 2199
- url = c.repourl % { 'name': name }
}