[Zodb-checkins] CVS: Zope3/src/zodb/storage - file.py:1.8.4.9
Jeremy Hylton
jeremy@zope.com
Wed, 12 Mar 2003 12:17:26 -0500
Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv8019/storage
Modified Files:
Tag: opaque-pickles-branch
file.py
Log Message:
If data is None, then refs is None too.
=== Zope3/src/zodb/storage/file.py 1.8.4.8 => 1.8.4.9 ===
--- Zope3/src/zodb/storage/file.py:1.8.4.8 Tue Mar 11 18:38:39 2003
+++ Zope3/src/zodb/storage/file.py Wed Mar 12 12:17:25 2003
@@ -961,12 +961,14 @@
data = None
if data is None:
dlen = 0
+ nrefs = 0
else:
dlen = len(data)
+ nrefs = len(refs)
# Write the recovery data record
self._tfile.write(pack(DATA_HDR,
oid, serial, old, self._pos,
- len(version), len(refs), dlen))
+ len(version), nrefs, dlen))
# We need to write some version information if this revision is
# happening in a version.
if version:
@@ -2070,9 +2072,10 @@
# undoes the object creation. It either aborts
# the version that created the object or undid the
# transaction that created it. Return None
- # instead of a pickle to indicate this.
+ # for data and refs because the backpointer has
+ # the real data and refs.
data = None
- refs = []
+ refs = None
else:
data, refs, _s, tid = self._loadBackTxn(h.oid, h.back)
prev_txn = self.getTxnFromData(h.oid, h.back)