Re: APE and bobobase_modification_time
--- In zope@yahoogroups.com, Paul Winkler <pw_lists@s...> wrote:
I'm using APE to copy back and forth from a FileStorage. And I need to set bobobase_modification_time (on the APE side) to help keeping things in sync. How could I do that?
generally, bobobase_modification_time is a low-level timestamp meaning "this object was modified in the database at this time." You aren't supposed to muck with it.
You probably want an application-level timestamp, like DublinCore's modified date.
Are you using zsyncer by any chance? Its reliance on bobobase_modification_time is really a bit of a kludge.
The procedure is as follows: I export the original data.fs, using APE, to a directory-based hierarchy on the filesystem. Then I use CVS to syncronize this structure among other users, and then copy the modified objects back into the FileStorage. I don't care about undo history (that's done thru CVS) so the storage is re-created each time. This works fine except that, when objects are exported to the filesystem, files are created with the current date/time, and ALL files get marked as 'modified' by CVS, making the update/commit process very long. So I wish to be able to: - set each file's date/time to the 'last-modification-time' of the corresponding, original object in data.fs - and viceversa, set the 'last-modification-time' of each object equal to it's filesystem counterpart after updating. In other words, if objects are unmodified, I want to preserve its date/time; and if they are modified, I want to keep the last-modification-time. I think I could manage to do the first thing, but I have no idea on how to do the second. Gabriel Genellina Softlab SRL
On Thu, Nov 20, 2003 at 09:37:12PM -0300, Gabriel Genellina wrote:
So I wish to be able to: - set each file's date/time to the 'last-modification-time' of the corresponding, original object in data.fs - and viceversa, set the 'last-modification-time' of each object equal to it's filesystem counterpart after updating. In other words, if objects are unmodified, I want to preserve its date/time; and if they are modified, I want to keep the last-modification-time. I think I could manage to do the first thing, but I have no idea on how to do the second.
Sorry I've no idea how to tackle this. If nobody here gives you a suggestion, you might also try the zodb-dev list; you're more likely to get the attention of the APE developers there. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SPAMSTRANGLING HEART PIRATE! (random hero from isometric.spaceninja.com)
On Thu, Nov 20, 2003 at 09:37:12PM -0300, Gabriel Genellina wrote:
So I wish to be able to: - set each file's date/time to the 'last-modification-time' of the corresponding, original object in data.fs - and viceversa, set the 'last-modification-time' of each object equal to it's filesystem counterpart after updating. In other words, if objects are unmodified, I want to preserve its date/time; and if they are modified, I want to keep the last-modification-time. I think I could manage to do the first thing, but I have no idea on how to do the second.
Let me jump in here with an observation. I've recently setup APE, Zope 2.7b2 and subversion. APE seems plenty fast, so I don't see the value in re-importing the file system contents back into ZODB. Why do you want to do that? Why not just leave everything in an APE fs ? -- I did find a problem with APE, it cannot handle an LDAPUserFolder. I've sent a note to Shane but no answer yet, and I haven't seen any posts from him on any list recently, so I'm a bit concerned about his welfare. Any know if Shane is ok? -- Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax http://www.wecanstopspam.org/ AOL-IM: BKClements
I did find a problem with APE, it cannot handle an LDAPUserFolder. I've sent a note to Shane but no answer yet, and I haven't seen any posts from him on any list recently, so I'm a bit concerned about his welfare. Any know if Shane is ok?
He's onsite for a customer doing a sprint this week. But he looked ok to me... :^) Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
Gabriel Genellina wrote at 2003-11-20 21:37 -0300:
The procedure is as follows: I export the original data.fs, using APE, to a directory-based hierarchy on the filesystem. Then I use CVS to syncronize this structure among other users, and then copy the modified objects back into the FileStorage. I don't care about undo history (that's done thru CVS) so the storage is re-created each time. This works fine except that, when objects are exported to the filesystem, files are created with the current date/time, and ALL files get marked as 'modified' by CVS, making the update/commit process very long. So I wish to be able to: - set each file's date/time to the 'last-modification-time' of the corresponding, original object in data.fs
The "serial" carried by each object record is in fact a timestamp (used as source by "bobobase_modification_time"). Look at the "bobobase_modification_time" source how to convert it again into a time (as look at "ZODB.TimeStamp"). -- Dieter
participants (5)
-
Brad Clements -
Brian Lloyd -
Dieter Maurer -
Gabriel Genellina -
Paul Winkler