Thursday, 21 February 2008

subversion and output folders

Wow, first post in this blog. This post may be interesting fot those are going to import some big old stuff into subversion. Below is depiction of one of problems I've encountered today. Never ever add your 'release', 'target', 'bin' or whatever directories into subversion. If you'll import big project and for whatever reason you'll add placeholders for output directories you're buried. At first update (after build you'll) realize that 'insert name of your favorite build system' removed your bin directory (and it's .svn metafolders). Svn will immediately start to complain with something like this:
svn: 'product\library\foo\bin' is not a working copy directory
In order to fix this mess you'll have to: 1. remove directory in question
rm -rf product\library\foo\bin
2. order svn to cleanup it's internal mess
svn cleanup product\library\foo
3. update in order to resurrect broken folders
svn up product\library\foo
4. finally remove this folder
svn rm product\library\foo\bin
So if you'll happen to have 20 folders with this setup in your repo you'll have few minutes of cleanup. Avoid it!

No comments: