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

Jeremy Hylton jeremy@zope.com
Thu, 23 Jan 2003 11:58:10 -0500


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

Modified Files:
      Tag: new-pickle-branch
	fsdump.py 
Log Message:
Update to new FS metadata format.


=== Zope3/src/zodb/storage/fsdump.py 1.2.4.1 => 1.2.4.2 ===
--- Zope3/src/zodb/storage/fsdump.py:1.2.4.1	Thu Jan 23 11:10:53 2003
+++ Zope3/src/zodb/storage/fsdump.py	Thu Jan 23 11:58:06 2003
@@ -14,8 +14,8 @@
 """A low-level utility to dump the internal FileStorage representation."""
 
 import struct
-from zodb.storage.file import TRANS_HDR, TRANS_HDR_LEN
-from zodb.storage.file import DATA_HDR, DATA_HDR_LEN
+from zodb.storage.file \
+     import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR, DATA_HDR_LEN
 from zodb.utils import u64
 
 def fmt(p64):
@@ -33,9 +33,10 @@
         self.dest = dest
 
     def dump(self):
-        fid = self.file.read(4)
+        fid = self.file.read(1023)
         print >> self.dest, "*" * 60
-        print >> self.dest, "file identifier: %r" % fid
+        print >> self.dest, "file identifier: %r" % fid[:4]
+        print >> self.dest, "database version: %r" % fid[4:8]
         while self.dump_txn():
             pass