Caught Out By Subversion

I’ve just been caught out by Subversion!

I copied a directory to another branch in my code tree using the cp command from a command shell and then tried to add the new directory to Subversion. To my surprise, Subversion told me that the directory was already under source control.

When you copy directories that are under Subversion control, you have to be careful about the .svn directories as Subversion uses these to keep track of what is going on.

In the Windows world this isn’t too much of a problem as the files are there to see in explorer. In the Unix/Mac world however they are hidden files and are easily forgotten about.