[Zodb-checkins] CVS: Zope/lib/python/ZODB - ConflictResolution.py:1.5.10.1

Chris McDonough chrism@zope.com
Wed, 3 Oct 2001 15:52:59 -0400


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv27046

Modified Files:
      Tag: Zope-2_4-branch
	ConflictResolution.py 
Log Message:
Changed the conflict resolution machinery to avoid attempting to resolve conflicts on ZClasses, because we can't import their "modules" (we don't have a db connection).


=== Zope/lib/python/ZODB/ConflictResolution.py 1.5 => 1.5.10.1 ===
 
 bad_classes={}
-bad_class=bad_classes.has_key
+def bad_class(class_tuple):
+    if bad_classes.has_key(class_tuple) or class_tuple[0][1] == '*':
+        # if we've seen the class before or if it's a ZClass, we know that
+        # we can't resolve the conflict
+        return 1
 
 ResolvedSerial='rs'