[Zodb-checkins] CVS: Zope2/lib/python/ZODB - Connection.py:1.48

Jim Fulton jim@digicool.com
Wed, 28 Mar 2001 15:55:41 -0500 (EST)


Update of /cvs-repository/Zope2/lib/python/ZODB
In directory korak:/tmp/cvs-serv18832

Modified Files:
	Connection.py 
Log Message:
Changed test for special serial number that indicates conflict
resolution has taken place to use an equality, rather than an identity
test. This was necessary because identity doesn't really work over a
ZEO connection (although it could, in the future).



--- Updated File Connection.py in package Zope2/lib/python/ZODB --
--- Connection.py	2001/03/20 04:00:17	1.47
+++ Connection.py	2001/03/28 20:55:39	1.48
@@ -379,7 +379,7 @@
                 # Note that if s is false, then the storage defered the return
                 if _type(s) is _st:
                     # normal case
-                    if s is ResolvedSerial:
+                    if s == ResolvedSerial:
                         # resolved conflict
                         object._p_changed=None
                     else:
@@ -391,13 +391,13 @@
                         if _type(s) is not _st: raise s
                         o=get(oi, oi)
                         if o is not oi:
-                            if s is ResolvedSerial:
+                            if s == ResolvedSerial:
                                 o._p_changed=None
                             else:
                                 o._p_serial=s
                                 o._p_changed=0
                         elif oi == oid:
-                            if s is ResolvedSerial:
+                            if s == ResolvedSerial:
                                 object._p_changed=None
                             else:
                                 object._p_serial=s
@@ -630,7 +630,7 @@
                 o=get(oid, oid)
                 if o is not oid:
                     if _type(s) is not _st: raise s
-                    if s is ResolvedSerial:
+                    if s == ResolvedSerial:
                         o._p_changed=None
                     else:
                         o._p_serial=s