I’ve had a reoccurring problem, and I’m blogging it for my memory’s sake.
The other day, I had an issue where a folder of mine was not being checked into Subversion via the Subversive plugin for Eclipse. The folder had an exclamation mark and refused to be committed. I couldn’t find any reference to what the exclamation mark meant. SVN cleanup didn’t work. On a lark, I started looking though the svn metadata in the .svn folder and saw that the metadata was pointing to the wrong repository. It then hit me what had happened.
I had started this project from scratch, but was grabbing files from other projects. I only grabbed only one folder, the folder containing the error handling templates; I just copied the folder via Eclipse from the original version controlled project to my new one. When you do this Eclipse copies not just the visible files but also the .svn metadata. Because of this when I went to commit Subversion could not reconcile that folder to the proper location and through errors.
To fix this:
- delete the .svn subfolder in the folder in question and any subfolders
- Then check in the folder again it should prompt you to add the files to the repository
To prevent this:
- Don’t copy version controlled folders between projects in Eclipse
- Create a mirrored folder structure
- Copy files into new folder structure
A better way to prevent this:
- Encapsulate and consolidate your code such that you don’t create the need to copy files between projects
Hope this helps someone else out there.