[Zodb-checkins] CVS: Zope/lib/python/ZODB - fspack.py:1.5.4.3 fsdump.py:1.3.70.3

Jeremy Hylton jeremy at zope.com
Fri Jun 13 12:47:58 EDT 2003


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv10166/lib/python/ZODB

Modified Files:
      Tag: Zope-2_6-branch
	fspack.py fsdump.py 
Log Message:
Cross-port bug fixes from the ZODB3-3_1-branch.


=== Zope/lib/python/ZODB/fspack.py 1.5.4.2 => 1.5.4.3 ===
--- Zope/lib/python/ZODB/fspack.py:1.5.4.2	Tue May 20 08:58:21 2003
+++ Zope/lib/python/ZODB/fspack.py	Fri Jun 13 11:47:56 2003
@@ -42,6 +42,11 @@
     def fsIndex():
         return {}
 
+def _fmt_oid(oid):
+    if oid:
+        return "%016x" % ZODB.utils.u64(oid)
+    return oid
+
 class CorruptedError(Exception):
     pass
 
@@ -78,7 +83,7 @@
 
     # subclasses must provide _file
 
-    _metadata_size = 4
+    _metadata_size = 4L
     _format_version = "21"
 
     def _read_num(self, pos):
@@ -465,7 +470,7 @@
         del self.oid2curpos
 
     def buildPackIndex(self):
-        pos = 4
+        pos = 4L
         while pos < self.eof:
             th = self._read_txn_header(pos)
             if th.tid > self.packtime:


=== Zope/lib/python/ZODB/fsdump.py 1.3.70.2 => 1.3.70.3 ===
--- Zope/lib/python/ZODB/fsdump.py:1.3.70.2	Fri Nov 15 12:45:03 2002
+++ Zope/lib/python/ZODB/fsdump.py	Fri Jun 13 11:47:56 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##############################################################################
 from ZODB.FileStorage import FileIterator
 from ZODB.TimeStamp import TimeStamp
 from ZODB.utils import U64
@@ -103,7 +116,7 @@
         pos = self.file.tell()
         h = self.file.read(TRANS_HDR_LEN)
         if not h:
-            return False
+            return 0
         tid, stlen, status, ul, dl, el = struct.unpack(TRANS_HDR, h)
         end = pos + U64(stlen)
         print >> self.dest, "=" * 60
@@ -126,7 +139,7 @@
             self.dump_data(pos)
         stlen2 = self.file.read(8)
         print >> self.dest, "redundant trec len: %d" % U64(stlen2)
-        return True
+        return 1
 
     def dump_data(self, tloc):
         pos = self.file.tell()




More information about the Zodb-checkins mailing list