slightly OT - differencing and version control

Mark Wieder mwieder at ahsoftware.net
Fri Oct 13 14:13:56 EDT 2006


Chris-

Friday, October 13, 2006, 9:03:54 AM, you wrote:

> Is there something like this that even exists? I realize since Rev
> stacks contain binary data it makes things a bit more difficult. Is
> there anything out there that can handle binary files this way? If  
> not, could something like this be created with Rev? If so, how  
> difficult would it be?

Here's the approach I took: any rev object can be described by its
1. script
2. properties
3. custom properties
4. custom property sets (and 3 recursively)

I made a client-end plugin that enumerates these and sends them as
text over a socket connection to a server that stores them away as
(item,value) pairs. Checking an object out then is a matter of
grabbing the description and, item by item, issuing set commands.

Checkin:
foreColor,"black"
backColor,"white"

Checkout:
in a repeat loop:
put item 1 of line x of tDescription into tProp
put item 2 of line x of tDescription into tValue
set the tProp of control tObject to tValue

Diffing two versions of an object:
I save only the complete contents of the current version an object.
Previous versions have only the items that are different from the
next-most-recent saved. To see the difference between the two latest
versions you just have to display those items. To diff a less recent
version you work your way back down the chain.

There *are* some problems with this, notably with respect to object
ids if you need to recreate the entire stack from its descriptions or
when one developer checks in a new control and a second developer
needs to import it into an existing stack. Object ids (with the
exception of images) are immutable in rev for some reason.

Hope this helps. Next step (someday) is to integrate this with
subversion.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list