Schedule Updating SVN Working Copies -- ANT
Published on
I watched Mark Esher's presention "ANT On The Wire: Using FTP, Email, SVN, and VSS" a couple weeks ago and liked the idea of scheduling an ant to do my SVN updates before I get into the office. He was kind enough to provide a zip of his files from the presention. Please watch the presentation to see how to setup ant.
I modified his code a little so the following is based off his zip and assumes you have everything working he covered. I am storing a list of my working copy locations, my svn username, and my svn password in his unames.properties files. I changed the GetLatest.xml code to an update instead of a checkout and added a loop so I could update all my working copys. The looping feature is accomplished with Ant-Contrib. You will have to install this like Mark shows for the other jars.
I made a bat file to fire off the GetLatest.xml Ant. It also creates a log file for the latest run. I created a shortcurt of the bat file, putting it in my start menu so I can fire it easily. I also put a shortcut in my startup just incase Windows Task Scheduler doesn't work. I set Windows Task Scheduler to run the bat file every morning before I get into the office.
Included in my zip is the revised GetLatest.xml, unames.properties, GetLatest.bat, and GetLatest.log files Files in zip:
GetLatest.xml - ant script to run svn update over a list of working copy paths
unames.properties - contains variabes settings such svn login information and working copy paths
GetLatest.bat - runs the GetLatest.xml ant and outputs a log files_
GetLatest.log - output from running the GetLatest.bat_ GetLatest.xml
_