[Zodb-checkins] CVS: StandaloneZODB/ZODB - BaseStorage.py:1.17.4.2 FileStorage.py:1.77.4.10
Jeremy Hylton
jeremy@zope.com
Thu, 24 Jan 2002 19:43:23 -0500
Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv765
Modified Files:
Tag: Recovery
BaseStorage.py FileStorage.py
Log Message:
recover() -> restore()
restore seems to capture the behavior just as well and avoids
confusion with the recover() function in FileStorage, which has to do
with recovering a corrupted storage.
=== StandaloneZODB/ZODB/BaseStorage.py 1.17.4.1 => 1.17.4.2 ===
preindex={};
preget=preindex.get # waaaa
- # recover() is a new storage API method which has an identical
+ # restore() is a new storage API method which has an identical
# signature to store() except that it does not return anything.
- # Semantically, recover() is also identical to store() except that it
+ # Semantically, restore() is also identical to store() except that it
# doesn't do the ConflictError or VersionLockError consistency
- # checks. The reason to use recover() over store() in this method is
+ # checks. The reason to use restore() over store() in this method is
# that store() cannot be used to copy transactions spanning a version
# commit or abort, or over transactional undos.
#
- # We'll use recover() if it's available, otherwise we'll fall back to
+ # We'll use restore() if it's available, otherwise we'll fall back to
# using store(). However, if we use store, then
# copyTransactionsFrom() may fail with VersionLockError or
# ConflictError.
- if hasattr(self, 'recover'):
- recovering = 1
+ if hasattr(self, 'restore'):
+ restoring = 1
else:
- recovering = 0
+ restoring = 0
for transaction in other.iterator():
tid=transaction.tid
@@ -269,8 +269,8 @@
for r in transaction:
oid=r.oid
if verbose: print `oid`, r.version, len(r.data)
- if recovering:
- self.recover(oid, r.serial, r.data, r.version, transaction)
+ if restoring:
+ self.restore(oid, r.serial, r.data, r.version, transaction)
else:
pre=preget(oid, None)
s=self.store(oid, pre, r.data, r.version, transaction)
=== StandaloneZODB/ZODB/FileStorage.py 1.77.4.9 => 1.77.4.10 ===
self._lock_release()
- def recover(self, oid, serial, data, version, transaction):
+ def restore(self, oid, serial, data, version, transaction):
# A lot like store() but without all the consistency checks. This
# should only be used when we /know/ the data is good, hence the
# method name. While the signature looks like store() there are some