[Neo-report] r1811 vincent - in /trunk/neo/client: Storage.py app.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 22 10:34:09 CET 2010
Author: vincent
Date: Mon Feb 22 10:34:09 2010
New Revision: 1811
Log:
Forward abortVersion and commitVersion to app, and add consistency checks.
Modified:
trunk/neo/client/Storage.py
trunk/neo/client/app.py
Modified: trunk/neo/client/Storage.py
==============================================================================
--- trunk/neo/client/Storage.py [iso-8859-1] (original)
+++ trunk/neo/client/Storage.py [iso-8859-1] Mon Feb 22 10:34:09 2010
@@ -111,11 +111,13 @@
def supportsTransactionalUndo(self):
return True
+ @check_read_only
def abortVersion(self, src, transaction):
- return '', []
+ return self.app.abortVersion(src, transaction)
+ @check_read_only
def commitVersion(self, src, dest, transaction):
- return '', []
+ return self.app.commitVersion(src, dest, transaction)
def __len__(self):
return self.app.getStorageSize()
Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Mon Feb 22 10:34:09 2010
@@ -962,6 +962,16 @@
# should ask the primary master
return self.local_var.tid
+ def abortVersion(self, src, transaction):
+ if transaction is not self.local_var.txn:
+ raise StorageTransactionError(self, transaction)
+ return '', []
+
+ def commitVersion(self, src, dest, transaction):
+ if transaction is not self.local_var.txn:
+ raise StorageTransactionError(self, transaction)
+ return '', []
+
def __del__(self):
"""Clear all connection."""
# Due to bug in ZODB, close is not always called when shutting
More information about the Neo-report
mailing list