From aa7bd65bf531f5e1d9cc0d49f865467fe76c800a Mon Sep 17 00:00:00 2001 From: Jim Fulton <jim@zope.com> Date: Wed, 7 Jul 1999 19:57:55 +0000 Subject: [PATCH] Fixed undo bug. Undo didn't properly invalidate objects. --- src/ZODB/DB.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ZODB/DB.py b/src/ZODB/DB.py index 5c8833e0..116c0385 100644 --- a/src/ZODB/DB.py +++ b/src/ZODB/DB.py @@ -84,8 +84,8 @@ ############################################################################## """Database objects -$Id: DB.py,v 1.9 1999/07/01 13:26:37 brian Exp $""" -__version__='$Revision: 1.9 $'[11:-2] +$Id: DB.py,v 1.10 1999/07/07 19:57:55 jim Exp $""" +__version__='$Revision: 1.10 $'[11:-2] import cPickle, cStringIO, sys, POSException from Connection import Connection @@ -151,8 +151,7 @@ class DB: # Pass through methods: for m in ('history', 'modifiedInVersion', - 'supportsUndo', 'supportsVersions', - 'undo', 'undoLog', + 'supportsUndo', 'supportsVersions', 'undoLog', 'versionEmpty', 'versions'): setattr(self, m, getattr(storage, m)) @@ -455,6 +454,10 @@ class DB: def cacheStatistics(self): return () # :( + def undo(self, id): + for oid in self._storage.undo(id): + self.invalidate(oid) + def versionEmpty(self, version): return self._storage.versionEmpty(version) -- 2.30.9