[Zodb-checkins] CVS: ZODB3/ZODB - fsdump.py:1.4

Jeremy Hylton jeremy@zope.com
Mon, 21 Oct 2002 11:09:52 -0400


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv6456

Modified Files:
	fsdump.py 
Log Message:
Print backpointer if its exists.


=== ZODB3/ZODB/fsdump.py 1.3 => 1.4 ===
--- ZODB3/ZODB/fsdump.py:1.3	Mon Feb 11 14:38:09 2002
+++ ZODB3/ZODB/fsdump.py	Mon Oct 21 11:09:52 2002
@@ -64,8 +64,14 @@
                 version = "version=%s " % rec.version
             else:
                 version = ''
-            print >> file, "  data #%05d oid=%016x %sclass=%s" % \
-                  (j, U64(rec.oid), version, fullclass)
+            if rec.data_txn:
+                # XXX It would be nice to print the transaction number
+                # (i) but it would be too expensive to keep track of.
+                bp = "bp=%016x" % U64(rec.data_txn)
+            else:
+                bp = ""
+            print >> file, "  data #%05d oid=%016x %sclass=%s %s" % \
+                  (j, U64(rec.oid), version, fullclass, bp)
             j += 1
         print >> file
         i += 1