Commits

Maurits van Rees committed 572904c

If two sections use the same directory, they share there ignore settings.

Comments (0)

Files changed (2)

 
 - Allow more than one vcs in a directory.  This was already possible
   before, but now known you no longer need to list all the checkouts
-  of the competing vcs in the ignore option.
+  of the competing vcs in the ignore option.  Also, items that are
+  ignored in one section are now also ignored in other sections for
+  the same directory.
   Fixes #11.
   [maurits]
 

checkoutmanager/config.py

         # First get the currently configured items.  Note that one
         # directory can now contain checkouts from more than one vcs.
         base_configured = {}
+        base_ignored = {}
         for section in sections:
             checkouts = linesstring_as_list(
                 self.parser.get(section, 'checkouts'))
             if basedir not in base_configured:
                 base_configured[basedir] = []
             base_configured[basedir] += configured
+            ignore = linesstring_as_list(
+                self.parser.get(section, 'ignore'))
+            if basedir not in base_ignored:
+                base_ignored[basedir] = []
+            base_ignored[basedir] += ignore
 
         # Now get present and missing items.
         for section in sections:
             configured = set(base_configured[basedir])
             missing = present - configured
             if missing:
-                ignore = linesstring_as_list(
-                    self.parser.get(section, 'ignore'))
+                ignore = base_ignored[basedir]
                 real_missing = []
                 for directory in missing:
                     if directory in ignore: