Compare files between on-rev and local versions

Sarah Reichelt sarah.reichelt at gmail.com
Sat Jun 20 20:33:17 EDT 2009


On Sun, Jun 21, 2009 at 10:08 AM, Alex Tweedly<alex at tweedly.net> wrote:
> I've seen a couple of requests for this on the on-rev forums, and had the
> same need myself. So I've developed a stack + irev to do this for me. It
> consists of two parts :
>  - a rev stack (aka the client)
>  - a .irev file to place somewhere within your on-rev site
>
> When you run the client stack, it will use the .irev file to retrieve info
> about the files within your site, and then compare against against the local
> versions of the (hopefully same) files.
>
> The stack can be downloaded from
> http://www.alextweedly.on-rev.com/Downloads/AllFilesInfoClient.rev
> The irev file is embedded within the stack - click on the "iRev" button and
> it will create (in the same directory) a file called allfilesinfo.irev -
> this should be uploaded to your site.
>
> When you run the client, you give it the path to your local directory, and
> the url (without the "http://") to the place where you put the
> allfilesinfo.irev
>
> You can (and should) verify the remote url has been uploaded properly, by
> checking with your browser (e.g. for me, I look at
> http://www.alextweedly.on-rev.com/allfilesinfo.irev ) - the client will use
> this same url to get the info about the files on the server. This irev
> script will walk the entire directory below where it is installed, and store
> in each directory a file containing the detailed files info, plus the
> md5digest of each file. Note that subsequent runs will compare modification
> dates, and only re-generate the md5 hash for those files which have changed,
> so it is substantially faster than the first time.
>
> The client does the same thing - generates files containing the detailed
> file info plus the md5 hash of each file. It then compares this against the
> remote info; it will complain ONLY if it finds matching files in the
> equivalent directories which do not have the same md5 hash.
>
> The script should be fairly easy to follow, even if it is a bit untidy. One
> of the things that I hope will settle down (and be improved) is the best way
> to share code between irev files and stacks.

Hi Alex,

Many thanks for making this available. I definitely need it as I work
on 2 different computers so am always at risk of using an older file
and losing my updates.

So far, I haven't actually set it working, as I am reading your
scripts and learning how you did it.

The button to save the irev file didn't work for me (no error, but no
file created), so I grabbed the text directly out of the custom
property, however it requires your html.irev include file. It may be
that the only relevant bit from that is the definition of hBR, in
which case that is an easy fix.

I'll you know how I get on.

Cheers,
Sarah



More information about the use-livecode mailing list