[Zope3-checkins] CVS: Zope3/src/zope/configuration - xmlconfig.py:1.6

Jim Fulton jim@zope.com
Tue, 11 Mar 2003 15:11:51 -0500


Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv15785/src/zope/configuration

Modified Files:
	xmlconfig.py 
Log Message:
Fixed a bug in overriding directives in zcml.

An including file is supposed to be able to override directives in an
included file. This didn't work (before this fix) is the overriding
directive came after the include.

We still need a way to put overrides in a (different) included file.


=== Zope3/src/zope/configuration/xmlconfig.py 1.5 => 1.6 ===
--- Zope3/src/zope/configuration/xmlconfig.py:1.5	Thu Jan  2 11:52:38 2003
+++ Zope3/src/zope/configuration/xmlconfig.py	Tue Mar 11 15:11:18 2003
@@ -373,6 +373,11 @@
         # Check for conflicts
         conflicts = {}
         for des, actions in unique.items():
+
+            # We need to sort the actions by the paths so that the shortest
+            # path with a given prefix comes first:
+            actions.sort()
+
             path, i, loc, f = actions[0]
             for opath, i, oloc, f in actions[1:]:
                 # Test whether path is a prefix of opath