[Zodb-checkins] CVS: Zope3/src/zodb/storage - file.py:1.19

Barry Warsaw barry@wooz.org
Fri, 14 Mar 2003 15:45:42 -0500


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv26194

Modified Files:
	file.py 
Log Message:
store(), _undo_record(): Conflict resolution now returns a 2-tuple of
the data and the refs (as a list of oids).


=== Zope3/src/zodb/storage/file.py 1.18 => 1.19 ===
--- Zope3/src/zodb/storage/file.py:1.18	Fri Mar 14 15:01:52 2003
+++ Zope3/src/zodb/storage/file.py	Fri Mar 14 15:45:41 2003
@@ -853,7 +853,8 @@
                     pnv = h.pnv
 
                 if serial != h.serial:
-                    data = self._conflict.resolve(oid, h.serial, serial, data)
+                    data, refs = self._conflict.resolve(
+                        oid, h.serial, serial, data)
 
             pos = self._pos
             here = pos + self._tfile.tell() + self._thl
@@ -1231,15 +1232,16 @@
         # that code isn't written yet
 
         try:
-            data = self._conflict.resolve(h.oid, cserial, h.serial, bdata,
-                                          cdata)
+            data, refs = self._conflict.resolve(h.oid, cserial, h.serial,
+                                                bdata, cdata)
         except interfaces.ConflictError:
             data = None
+            refs = []
 
         if data is None:
             raise UndoError(h.oid,
                             "Some data were modified by a later transaction")
-        return data, "", 0, h.version, snv, ipos
+        return data, ''.join(refs), 0, h.version, snv, ipos
 
 
     # undoLog() returns a description dict that includes an id entry.