views:

142

answers:

1

I'm creating a batch file (on Windows Vista) to deploy my project from development to our staging server. The code I currently have is:

:: Copy files from development to staging
robocopy \\local\file\path \\staging\file\path /MIR /Z /XD .svn /NFL /NDL /XF *.cs *.sln *.csproj *.suo *.resx *.user *.sln.cache
:: Create a new SVN tag in the format 'Staging_vYYYY.MM.DD.HH.MM'
svn copy http://repo:8080/svn/project/trunk http://repo:8080/svn/project/tags/Staging_v%date:~-4,4%.%date:~-10,2%.%date:~-7,2%.%time:~-11,2%.%time:~-8,2% --username ##### --password ##### -m "Tag for newest version on staging" --force-log

For each push to staging/qa, it creates a new tag in subversion. I want to keep some of this history around but I don't want to bog down my tag directory either. Ideally, I'd like the batch file to also delete 'old' tags--say older than a month--to not waste harddrive space on un-needed backups.

Is there a way to do this? Is there a much better way to create a one-step deployment process?

+1  A: 

Subversion tags are 'shallow' copies; they don't do anything more than give a new name to a particular repository state. They don't cost much disk space at all - certainly not a full checkout's worth.

That said, you can delete tags with svn rm, the same way you would delete any other SVN URL; you could choose which to delete by examining the contents of svn info on each tag.

DDaviesBrackett
Ah, so the problem I'm trying to fix isn't actually a problem. My favorite kind of solution.
luckyllama