[Zope-Checkins] SVN: Zope/trunk/lib/python/ZODB/FileStorage/FileStorage.py Collector #1517: History tab for ZPT does not work

Tim Peters tim.one at comcast.net
Thu Sep 30 16:56:06 EDT 2004


Log message for revision 27722:
  Collector #1517: History tab for ZPT does not work
  
  FileStorage.history() was reading the user, description,
  and extension fields out of the object pickle, due to
  starting the read at a wrong location.
  


Changed:
  U   Zope/trunk/lib/python/ZODB/FileStorage/FileStorage.py


-=-
Modified: Zope/trunk/lib/python/ZODB/FileStorage/FileStorage.py
===================================================================
--- Zope/trunk/lib/python/ZODB/FileStorage/FileStorage.py	2004-09-30 20:50:50 UTC (rev 27721)
+++ Zope/trunk/lib/python/ZODB/FileStorage/FileStorage.py	2004-09-30 20:56:06 UTC (rev 27722)
@@ -1259,16 +1259,14 @@
                     wantver = None
 
                 th = self._read_txn_header(h.tloc)
-                user_name = self._file.read(th.ulen)
-                description = self._file.read(th.dlen)
-                if th.elen:
-                    d = loads(self._file.read(th.elen))
+                if th.ext:
+                    d = loads(th.ext)
                 else:
                     d = {}
 
                 d.update({"time": TimeStamp(h.tid).timeTime(),
-                          "user_name": user_name,
-                          "description": description,
+                          "user_name": th.user,
+                          "description": th.descr,
                           "tid": h.tid,
                           "version": h.version,
                           "size": h.plen,



More information about the Zope-Checkins mailing list