[Zodb-checkins] CVS: Zope3/src/zodb/storage - mapping.py:1.11

Barry Warsaw barry at zope.com
Thu Jul 10 14:40:10 EDT 2003


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

Modified Files:
	mapping.py 
Log Message:
Better coverage for lastTransaction() by moving the most common usage
into the BaseStorage class.  Since this method is required by
IStorage, and most implementations do it the same way, it makes
sense.

__init__(): Base class already initializes self._ltid

lastTransaction(): Factor this out to the base class.


=== Zope3/src/zodb/storage/mapping.py 1.10 => 1.11 ===
--- Zope3/src/zodb/storage/mapping.py:1.10	Fri Jun  6 11:24:20 2003
+++ Zope3/src/zodb/storage/mapping.py	Thu Jul 10 13:40:05 2003
@@ -38,7 +38,6 @@
         BaseStorage.__init__(self, name)
         self._index = {}
         self._tindex = []
-        self._ltid = None
 
     def close(self):
         pass
@@ -79,10 +78,7 @@
     def _finish(self, tid):
         for oid, serial, data, refs in self._tindex:
             self._index[oid] = serial, data, refs
-        self._ltid = self._serial
-
-    def lastTransaction(self):
-        return self._ltid
+        self._ltid = tid
 
     def pack(self, t, gc=True):
         """Perform a pack on the storage.




More information about the Zodb-checkins mailing list