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

Jeremy Hylton jeremy@zope.com
Thu, 13 Feb 2003 19:25:36 -0500


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

Modified Files:
      Tag: ZODB3-2-integration-branch
	mapping.py 
Log Message:
Add lastTransaction() method.


=== Zope3/src/zodb/storage/mapping.py 1.3 => 1.3.2.1 ===
--- Zope3/src/zodb/storage/mapping.py:1.3	Wed Feb  5 18:28:32 2003
+++ Zope3/src/zodb/storage/mapping.py	Thu Feb 13 19:25:36 2003
@@ -148,12 +148,15 @@
         return serial
 
     def _clear_temp(self):
-        self._tindex=[]
+        self._tindex = []
 
     def _finish(self, tid, user, desc, ext):
+        for oid, p in self._tindex:
+            self._index[oid] = p
+        self._ltid = self._serial
 
-        index=self._index
-        for oid, p in self._tindex: index[oid]=p
+    def lastTransaction(self):
+        return self._ltid
 
     def pack(self, t):
         self._lock_acquire()