Object versioning?
Luke-Jr <[email protected]> Thu, 30 Dec 2004 17:26:08 +0000
| Newsgroups | gmane.comp.lang.moo.general |
|---|---|
| Message-ID | <[email protected]> |
An idea that came up recently was the idea of adding to ability for MOO to
track changes to objects. This would add a few bifuncs:
INT mark_new_version(OBJ) - Marks a specific version-point on an object and
returns its revision number
diff_versions(OBJ, INT from-version, [INT to-version]) - Returns data
comparing the from-version with the to-version (or the current object if
not specified)
apply_diff(OBJ, diff-output) - Applys output from diff_versions to an object
version_history(OBJ) - Returns all data on an object and its versions
OBJ replay_version_history(version-history-data) - Creates a new object with
output from version_history
I haven't looked at how complex this would be to implement in GammaMOO, though
I don't expect it would be a simple task. It *could* be done without breaking
database compatibility by storing the data in a property ("\0HISTORY"?) when
writing the file, though doing so may confuse history-aware interpretors
after a history-unaware one has modified an object in an incompatible way.
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt