diff MoinMoin/config/multiconfig.py @ 4109:e88baf535b48

fix backup action configuration (broke on windows due to backslashes in e.g. cache_dir), try 2. cfg.backup_exclude is now just a function of filename, telling whether the file should be excluded. By default, no file is excluded.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 19 Sep 2008 21:41:40 +0200
parents 1cd493d5e113
children 62177a952833 4f3d0b92d1c9
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Thu Sep 18 22:19:44 2008 +0200
+++ b/MoinMoin/config/multiconfig.py	Fri Sep 19 21:41:40 2008 +0200
@@ -325,9 +325,6 @@
         # e.g u'%(page_front_page)s' % self
         self.navi_bar = [elem % self for elem in self.navi_bar]
 
-        # compile regex for backup exclusions and cache it
-        self.cache.backup_exclude_regex = re.compile("|".join(self.backup_exclude))
-
         # check if python-xapian is installed
         if self.xapian_search:
             try:
@@ -1204,13 +1201,7 @@
       ('compression', 'gz', 'What compression to use for the backup ("gz" or "bz2").'),
       ('users', [], 'List of trusted user names who are allowed to get a backup.'),
       ('include', [], 'List of pathes to backup.'),
-      ('exclude',
-       [
-        r"(.+\.py(c|o)$)",
-        r"%(/)spages%(/)s.+%(/)scache%(/)s[^%(/)s]+$" % {'/': os.sep},
-        r"%(/)s(edit-lock|event-log|\.DS_Store)$" % {'/': os.sep},
-       ],
-       'List of regular expressions matching files that should be excluded from the backup.'),
+      ('exclude', lambda filename: False, 'Function f(filename) that tells whether a file should be excluded from backup. By default, nothing is excluded.'),
     )),
 }