Search code examples
svnversion-controlvisual-sourcesafeperforcedeployment-project

Tracking Changes to a Directory Tree over Time


Does anyone know of an application or system out there for tracking changes (files added/removed, diffs on text files) to a non-source controlled directory over time? Something that would let you

  1. Take a snapshot of a certain directory tree at time A

  2. Come back at time period B and see what has changed

  3. Come back at time period C and see what's changed since time period A, and what's changed since time period B

A source control repository isn't an option here. I want something that works on a directory structure that isn't under any kind of revision control. My group isn't in control of the servers or directory trees in question, but changes to those trees impact us and we'd like to keep track of them. The objects to "source control" are

  1. Objections to any kind of centralized repository that requires document authors to check-in, check-out.

  2. Objections to having to hand-roll/automate a bunch of tasks that can leverage a version control system's feature set

I want a semi-mature package where people have spent some time thinking about the problem. If there's a version control system that's been built to handle this kind of thing, it applies.


Solution

  • Write a scripted scheduled task which copies the directory tree to another place, perhaps on a different machine, which is part of a version controlled repostiory. Then, the scheduled task would automatically commit changes, using the version control system of your choice (Mercurial should work nicely for this system, since hg commit -A -m "automated snapshot" will quickly do what you need without any interactive prompts).

    I'd suggest rsync for the copy, which is available for many platforms, and is fast and efficient since it won't copy files which haven't changed. Configure the copy to delete files from your copy which have been deleted on the main directory.