Dieter Maurer wrote:
Sam Brauer wrote at 2003-10-22 09:20 -0400:
I have a need to access all revisions of objects of a certain type in my ZODB. It is straightforward enough to find all currently existing instances and then access each one's history. The problem with that approach is that it misses objects that have been deleted (but could still be brought back by an undo operation).
Does anyone know a solution?
You know that deleted objects are finally removed by a pack?
Maybe, you should avoid deletion altogether and emulate deletion be moving to a thrash bin.
Dieter
That doesn't really address what I'm trying to do. I want deleted objects to eventually disappear due to packing. The "problem" is that I have certain objects that refer to files on the filesystem (sort of like External File). Unlike External File, my objects never delete their files from the filesystem, even when the objects are deleted. This is intentional... so that if a deletion is undone, the file it refers to will still exist. The problem is that I want to clean up the files that are truly orphaned (not even referred to by an unpacked deleted object). I have a sort of mark-and-sweep based script that should do the job OK, but I think it would be nicer if I could just check the zodb to see if there are any objects at all (even deleted ones) that refer to a particular file. Besides, I'm also curious to know what sort of info I can access in a zodb about old transactions and the objects they operated on. - Sam - Sam