Commit 16e43305 authored by Tim Peters's avatar Tim Peters

Merge rev 27222 from Zope trunk.

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.
parent bc46ade8
...@@ -21,6 +21,15 @@ Connection ...@@ -21,6 +21,15 @@ Connection
Restored Connection's private ``_opened`` attribute. This was still Restored Connection's private ``_opened`` attribute. This was still
referenced by ``DB.connectionDebugInfo()``, and Zope 2 calls the latter. referenced by ``DB.connectionDebugInfo()``, and Zope 2 calls the latter.
FileStorage
-----------
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. Looked like
cut-and-paste repetition of the same bug in ``FileStorage.FileIterator``
noted in the news for 3.3c1.
What's new in ZODB3 3.3 release candidate 1? What's new in ZODB3 3.3 release candidate 1?
============================================ ============================================
Release date: 14-Sep-2004 Release date: 14-Sep-2004
......
...@@ -1259,16 +1259,14 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -1259,16 +1259,14 @@ class FileStorage(BaseStorage.BaseStorage,
wantver = None wantver = None
th = self._read_txn_header(h.tloc) th = self._read_txn_header(h.tloc)
user_name = self._file.read(th.ulen) if th.ext:
description = self._file.read(th.dlen) d = loads(th.ext)
if th.elen:
d = loads(self._file.read(th.elen))
else: else:
d = {} d = {}
d.update({"time": TimeStamp(h.tid).timeTime(), d.update({"time": TimeStamp(h.tid).timeTime(),
"user_name": user_name, "user_name": th.user,
"description": description, "description": th.descr,
"tid": h.tid, "tid": h.tid,
"version": h.version, "version": h.version,
"size": h.plen, "size": h.plen,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment