[Zodb-checkins] CVS: Packages/ZODB - DemoStorage.py:1.18.10.2.4.1
Jim Fulton
jim at zope.com
Fri Jan 20 17:15:20 EST 2006
Update of /cvs-repository/Packages/ZODB
In directory cvs.zope.org:/tmp/cvs-serv15107/ZODB
Modified Files:
Tag: jim-test-storage
DemoStorage.py
Log Message:
Added lastTransaction, which ZEO wants
=== Packages/ZODB/DemoStorage.py 1.18.10.2 => 1.18.10.2.4.1 ===
--- Packages/ZODB/DemoStorage.py:1.18.10.2 Fri Apr 22 15:36:07 2005
+++ Packages/ZODB/DemoStorage.py Fri Jan 20 17:15:19 2006
@@ -87,6 +87,7 @@
from TimeStamp import TimeStamp
from cPickle import loads
from BTrees import OOBTree
+from ZODB.utils import z64
class DemoStorage(BaseStorage):
@@ -105,6 +106,8 @@
raise POSException.StorageError, (
"Demo base storage has version data")
+ self._ltid = z64
+
# While we officially don't support wrapping a non-read-only base
# storage, it has proved useful for test suites to wrap a ClientStorage
# in DemoStorage. The least we can do to help support that case is
@@ -322,6 +325,12 @@
if v is None:
v = self._vindex[version] = {}
v[oid] = r
+
+ self._ltid = tid
+
+ def lastTransaction(self):
+ """Return transaction id for last committed transaction"""
+ return self._ltid
def undo(self, transaction_id):
self._lock_acquire()
More information about the Zodb-checkins
mailing list