[MOO-Discuss] Object versioning?
Status: Planning
                
                Brought to you by:
                
                    luke-jr
                    
                
            | 
     
      
      
      From: Luke-Jr <lu...@ar...> - 2004-12-30 17:25:20
      
     
   | 
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.
 |