[Zodb-checkins] CVS: StandaloneZODB/bsddb3Storage/bsddb3Storage - Full.py:1.37.2.2 Minimal.py:1.11.2.2 MinimalReplicated.py:1.1.4.1 Packless.py:1.5.4.2

Jeremy Hylton jeremy@zope.com
Wed, 28 Nov 2001 15:54:48 -0500


Update of /cvs-repository/StandaloneZODB/bsddb3Storage/bsddb3Storage
In directory cvs.zope.org:/tmp/cvs-serv8044/bsddb3Storage/bsddb3Storage

Modified Files:
      Tag: StandaloneZODB-1_0-branch
	Full.py Minimal.py MinimalReplicated.py Packless.py 
Log Message:
Update to use new ConflictError constructor



=== StandaloneZODB/bsddb3Storage/bsddb3Storage/Full.py 1.37.2.1 => 1.37.2.2 ===
                     conflictresolved = 1
                 else:
-                    raise POSException.ConflictError(
-                        'serial number mismatch (was: %s, has: %s)' %
-                        (U64(oserial), serial and U64(serial)))
+                    raise POSException.ConflictError(serials=(oserial, serial))
             # Do we already know about this version?  If not, we need to
             # record the fact that a new version is being created.  `version'
             # will be the empty string when the transaction is storing on the


=== StandaloneZODB/bsddb3Storage/bsddb3Storage/Minimal.py 1.11.2.1 => 1.11.2.2 ===
                 # number.  Raise a ConflictError.
                 raise POSException.ConflictError(
-                    'serial number mismatch (was: %s, has: %s)' %
-                    (utils.U64(oserial), utils.U64(serial)))
+                    serials=(oserial, serial))
             # Our serial number is updated in BaseStorage's tpc_begin() call,
             # which sets the serial number to the current timestamp.
             serial = self._serial


=== StandaloneZODB/bsddb3Storage/bsddb3Storage/MinimalReplicated.py 1.1 => 1.1.4.1 ===
             if self._index.has_key(oid):
                 oserial=self._index[oid]
-                if serial != oserial: raise POSException.ConflictError
+                if serial != oserial:
+                    raise POSException.ConflictError(serials=(oserial, serial))
                 
             serial=self._serial
             self._tmp.write(oid+pack(">I", len(data)))


=== StandaloneZODB/bsddb3Storage/bsddb3Storage/Packless.py 1.5.4.1 => 1.5.4.2 ===
             if self._index.has_key(oid):
                 oserial=self._index[oid]
-                if serial != oserial: raise POSException.ConflictError
+                if serial != oserial:
+                    raise POSException.ConflictError(serials=(oserial, serial))
                 
             serial=self._serial
             try: