Subversion Ant for Files Changed between Two Revision Numbers

Ant Subversion

Here is my attempt to be able to pull a revision range from an svn repository. The ant script runs an svn log command, sets up the directory structure, then pulls the files down from the svn repository using an ant get command. It works but isn't pretty. Any deleted files will be tried to be pulled down. This could be cleaned up by removing the delete nodes from the xml. And I think the script could be modifiy to do an export on each file from the log if the svn repository is not accessible by url. I have been wanting to do this and finally was prompted by Export Subversion Files Changed between Two Revision Numbers. The post describes using TortoiseSVN but I was unable to get it working. This example script was modified from General ANT build and release scripts. The orginal script does an export, then removes any files not needed. It is time consuming if you have a large export so pulling only the changed files really speeds up the process. Other resources links: Ant-Contrib Tasks and Subversion. Download Example
UPDATE: ADDED ZIP. EXPECTS YOU HAVE SVN in your classpath. _


Exporting all files in revision ${startingRevision}:${endingRevision}


from ${svn.repoURL}


to ${temp.dir}/${jarfileTstamp}


**************************************


(this may take a couple of minutes!)


**************************************

${directory.path}

...files exported OK _