[Zodb-checkins] CVS: Zope3/src/zodb/storage - fsdump.py:1.3.8.4

Jeremy Hylton jeremy@zope.com
Tue, 11 Mar 2003 18:33:52 -0500


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

Modified Files:
      Tag: opaque-pickles-branch
	fsdump.py 
Log Message:
Print the value of MinPO objects -- very helpful for debugging tests.


=== Zope3/src/zodb/storage/fsdump.py 1.3.8.3 => 1.3.8.4 ===
--- Zope3/src/zodb/storage/fsdump.py:1.3.8.3	Mon Mar 10 15:17:32 2003
+++ Zope3/src/zodb/storage/fsdump.py	Tue Mar 11 18:33:47 2003
@@ -17,6 +17,7 @@
 from zodb.storage.file \
      import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR, DATA_HDR_LEN
 from zodb.utils import u64
+from zodb.storage.tests.base import zodb_unpickle
 
 def fmt(p64):
     # Return a nicely formatted string for a packaged 64-bit value
@@ -93,7 +94,10 @@
         self.file.read(nrefs * 8)
         # XXX print out the oids?
         print >> self.dest, "len(data): %d" % dlen
-        self.file.read(dlen)
+        data = self.file.read(dlen)
+        # A debugging feature for use with the test suite.
+        if data.startswith("(czodb.storage.tests.minpo\nMinPO\n"):
+            print >> self.dest, "value: %r" % zodb_unpickle(data).value
         if not dlen:
             sbp = self.file.read(8)
             print >> self.dest, "backpointer: %d" % u64(sbp)