So there I was in this discussion about Zope versioning (again) and there were two features requested that seemed perfectly reasonable at the time, - to have a list of all the objects changed by a version - to be able to individually commit or discard changes in a version on a per object basis This is would be extremely useful for those times when you forget to check out of a version and accidentally lock the root folder (This happens quite a bit). Simple I thought, but ugh versions go all the way down to FileStorage and got into ZODB stuff I didnt understand. I would have thought having a little refactoring to give two more methods: getVersionContents and commitObject would be possible, but Im scratching my head at FileStorage now. Before I embark down this path is there an easier way? Cheers. -- Andy McKay.
Andy McKay wrote:
So there I was in this discussion about Zope versioning (again) and there were two features requested that seemed perfectly reasonable at the time,
- to have a list of all the objects changed by a version - to be able to individually commit or discard changes in a version on a per object basis
This is would be extremely useful for those times when you forget to check out of a version and accidentally lock the root folder (This happens quite a bit). Simple I thought, but ugh versions go all the way down to FileStorage and got into ZODB stuff I didnt understand. I would have thought having a little refactoring to give two more methods: getVersionContents and commitObject would be possible, but Im scratching my head at FileStorage now.
Before I embark down this path is there an easier way?
Cheers. -- Andy McKay.
This is something I've been thinking about (and inspecting code with regard to) for a long time. And regrettably, the only idea I have come up with is copying attributes from one version into another, or disgusting things like that. I haven't implemented anything because it sounds too icky, and I keep thinking there's gotta be a better way :) Cheers, Tim -- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233
And regrettably, the only idea I have come up with is copying attributes from one version into another, or disgusting things like that. I haven't implemented anything because it sounds too icky, and I keep thinking there's gotta be a better way :)
You can actually search every object in the database to see if its in a version. As you say "icky". Cheers. -- Andy McKay.
On Tue, 23 Oct 2001, Andy McKay wrote:
and got into ZODB stuff I didnt understand. I would have thought having a little refactoring to give two more methods: getVersionContents and commitObject would be possible, but Im scratching my head at FileStorage now.
To my understanding, versions are implemented as long running transactions against the ZODB. So I think to do anything with them you have to put in hooks at the level of the ZODB transaction machinery. That might have some interesting byproducts if you were to do it <grin>. The zodb-dev list is probably the place to inquire.... ---RDM
To my understanding, versions are implemented as long running transactions against the ZODB. So I think to do anything with them you have to put in hooks at the level of the ZODB transaction machinery. That might have some interesting byproducts if you were to do it <grin>. The zodb-dev list is probably the place to inquire....
Hmmm. I'll give it a little while longer before I bug the gurus on zodb-dev... :) Cheers. -- Andy McKay.
participants (3)
-
Andy McKay -
R. David Murray -
Tim McLaughlin