Commit da9b7c2a authored by Jim Fulton's avatar Jim Fulton

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).
parent 7854cea5
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.47 2001/03/20 04:00:17 jim Exp $""" $Id: Connection.py,v 1.48 2001/03/28 20:55:39 jim Exp $"""
__version__='$Revision: 1.47 $'[11:-2] __version__='$Revision: 1.48 $'[11:-2]
from cPickleCache import PickleCache from cPickleCache import PickleCache
from POSException import ConflictError, ExportError from POSException import ConflictError, ExportError
...@@ -379,7 +379,7 @@ class Connection(ExportImport.ExportImport): ...@@ -379,7 +379,7 @@ class Connection(ExportImport.ExportImport):
# Note that if s is false, then the storage defered the return # Note that if s is false, then the storage defered the return
if _type(s) is _st: if _type(s) is _st:
# normal case # normal case
if s is ResolvedSerial: if s == ResolvedSerial:
# resolved conflict # resolved conflict
object._p_changed=None object._p_changed=None
else: else:
...@@ -391,13 +391,13 @@ class Connection(ExportImport.ExportImport): ...@@ -391,13 +391,13 @@ class Connection(ExportImport.ExportImport):
if _type(s) is not _st: raise s if _type(s) is not _st: raise s
o=get(oi, oi) o=get(oi, oi)
if o is not oi: if o is not oi:
if s is ResolvedSerial: if s == ResolvedSerial:
o._p_changed=None o._p_changed=None
else: else:
o._p_serial=s o._p_serial=s
o._p_changed=0 o._p_changed=0
elif oi == oid: elif oi == oid:
if s is ResolvedSerial: if s == ResolvedSerial:
object._p_changed=None object._p_changed=None
else: else:
object._p_serial=s object._p_serial=s
...@@ -630,7 +630,7 @@ class Connection(ExportImport.ExportImport): ...@@ -630,7 +630,7 @@ class Connection(ExportImport.ExportImport):
o=get(oid, oid) o=get(oid, oid)
if o is not oid: if o is not oid:
if _type(s) is not _st: raise s if _type(s) is not _st: raise s
if s is ResolvedSerial: if s == ResolvedSerial:
o._p_changed=None o._p_changed=None
else: else:
o._p_serial=s o._p_serial=s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment