Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a project on my head where i need to track changes in SVN repository.

Repo is at https://***.***.local/***/etc/. The user will specify 2 dates, start and end, and my task is to get md5 sums of all files in the specified repo path (including all subfolders) at the start date and compare those to the md5 sums at the end date - and create the report for repo locations of files that changed (not what exact lines changed). I checked out a bunch of modules on cpan and didnt find anything suitable. Any suggestions on how to implement this the easiest way?

All help is greatly appreciated!

Replies are listed 'Best First'.
Re: Track subversion changes
by kyle (Abbot) on Oct 16, 2008 at 21:26 UTC

    This should be pretty easy with vanilla SVN tools. I'm not a major SVN expert, but a quick look at the documentation tells me that you can probably say something like this:

    svn diff -r '{START DATE}' -r '{END DATE}' --summarize

    ...and it will spit out a list of files changed between those dates.

    If you really have to have md5 sums, there's a "svn cat" command to get file contents at any revision you want. Pipe that to "md5sum" and go.

      Thank you very much for the lightning fast answer!

      A question - does that mean that i would have to do an "svn update" each time i want to do an "svn diff"? Or is it done automatically if the end date is later than the last version?
        svn update updates your working copy it doesn't do anything to the repository, so the answer to your first question is no. The answer to your second question is no as well, but not for the reason the question implies. svn help will show you all available svn commands, and svn help <command> will show you the help for specific commands. I'm not wanting to come off as talking down to you, and maybe you know this already, but your question suggests that you might not have much experience with svn.
Re: Track subversion changes
by dragonchild (Archbishop) on Oct 17, 2008 at 14:31 UTC
    There are a number of SVN modules on CPAN. Furthermore, SVK (a wrapper around SVN) is written in Perl and is on CPAN as well.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?