This is not a blog. So sue me!

Crikey, things are looking up!

Tuesday, October 28, 2008

Flash and Subversion backups: Batch file to copy files excluding certain files

One thing about Flash (or any non-text binary type files) and Subversion, if you check your flas and swfs into a subversion library that is regularly backed up, for example nightly, you will soon be using a huge amount of space.

So the inestimable James (who's price is above that of rubies) found that our main code SVN library was not being backed up ...eek!

When he turned on backups in a reasonable schedule, well, we were checking in flas and swf several times in a day and these copies were all being stored in SVN as binary blobs or something, leading to a huge volume of backup files.

Our solution: Create a new SVN library just for Flash code, and don't bother backing it up except once per month. When we have code completed for the daily build we just drop swfs into the code build folder SVN. When we have significant code changes (finish an app, get ready for the weekly QA build)  we drop everything from our new SVN into the traditional place.

To help this, we have this little batch file to copy from the new SVN to the old one:


rem put the ".svn" string and the filename excludefile.txt into the file of things to be ignored
echo ".svn" > excludefile.txt
echo excludefile.txt >> excludefile.txt

rem copy all files in all subdirectories, excluding those with .svn in the path

XCOPY /S /E /EXCLUDE:excludefile.txt "C:\projects\binaryDoc\studentui" 

"C:\projects\current\trunk\autoskill\academy\modules\ui\app\src\web\studentui" /Y

rem remove the excludefile
del excludefile.txt

No comments:


St Lawrence Rowing

Test content from SLRC