Add exclusion lists to multidir configuration.
Wed Nov 9 23:59:47 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Add exclusion lists to multidir configuration.
diff -rN -u old-darcsweb/config.py.sample new-darcsweb/config.py.sample
--- old-darcsweb/config.py.sample 2015-04-15 14:38:03.000000000 +0000
+++ new-darcsweb/config.py.sample 2015-04-15 14:38:03.000000000 +0000
@@ -89,4 +89,8 @@
repourl = 'http://auriga.wearlab.de/~alb/repos/%(name)s'
repoencoding = 'latin1'
+ # if you want to exclude some directories, add them to this list (note
+ # they're relative to multidir, not absolute)
+ #exclude = [ 'dir1', 'dir2' ]
+
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2015-04-15 14:38:03.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2015-04-15 14:38:03.000000000 +0000
@@ -1783,6 +1783,8 @@
if 'multidir' not in dir(c):
continue
+ if 'exclude' not in dir(c):
+ c.exclude = []
entries = os.listdir(c.multidir)
entries.sort()
for name in entries:
@@ -1791,6 +1793,8 @@
fulldir = c.multidir + '/' + name
if not os.path.isdir(fulldir + '/_darcs'):
continue
+ if name in c.exclude:
+ continue
rdir = fulldir
desc = c.repodesc % { 'name': name }