[Zope-Checkins] CVS: Zope/lib/python/OFS - History.py:1.14.24.1 Image.py:1.142.10.1
Andreas Jung
andreas@andreas-jung.com
Sat, 16 Nov 2002 11:41:14 -0500
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv25283/OFS
Modified Files:
Tag: ajung-restructuredtext-integration-branch
History.py Image.py
Log Message:
merge from trunk
=== Zope/lib/python/OFS/History.py 1.14 => 1.14.24.1 ===
--- Zope/lib/python/OFS/History.py:1.14 Wed Aug 14 17:42:56 2002
+++ Zope/lib/python/OFS/History.py Sat Nov 16 11:40:43 2002
@@ -36,7 +36,7 @@
def commit(self, object, transaction):
if object._p_changed:
- raise TemporalParadox, "You can\'t change history!"
+ raise TemporalParadox, "You can't change history!"
def abort(*args, **kw): pass
@@ -53,7 +53,7 @@
return rev
class Historian(Implicit):
- """An Historian\'s job is to find hysterical revisions of
+ """An Historian's job is to find hysterical revisions of
objects, given a time."""
def __getitem__(self, key):
@@ -68,7 +68,7 @@
return rev.__of__(self.aq_parent)
def manage_workspace(self, REQUEST):
- "We aren\'t real, so we delegate to that that spawned us!"
+ "We aren't real, so we delegate to that that spawned us!"
raise 'Redirect', REQUEST['URL2']+'/manage_change_history_page'
class Historical(ExtensionClass.Base):
=== Zope/lib/python/OFS/Image.py 1.142 => 1.142.10.1 ===
--- Zope/lib/python/OFS/Image.py:1.142 Fri Oct 4 15:50:34 2002
+++ Zope/lib/python/OFS/Image.py Sat Nov 16 11:40:43 2002
@@ -323,7 +323,13 @@
# calculations allow us to fast-forward through the
# Pdata chain without a lot of dereferencing if we
# did the work already.
- closest_pos = start - (start % (1<<16))
+ first_size = len(pdata_map[0].data)
+ if start < first_size:
+ closest_pos = 0
+ else:
+ closest_pos = (
+ ((start - first_size) >> 16 << 16) +
+ first_size)
pos = min(closest_pos, max(pdata_map.keys()))
data = pdata_map[pos]