Problem copying versioned directories in Eclipse
In some of my code, I copied a struts2 templates directory from one portlet to another. Everything built fine, and I when I eventually checked everything in to Subversion, the results looked sane. However, I noticed later that it didn’t look like the template I copied was really in place.
Back in Eclipse, I synced my project to Subversion again, and sure enough – the templates directory was marked with a "+>" showing that it needed to be added. However, when I tried to commit that change, I got an error indicating that the directory already existed. This didn’t make much sense, because I looked in the Subversion repository, and it wasn’t there. Besides that, I could swear that at one point, Subversion had told me there were no differences between my workspace and the repository.
I chased this down, and it turned out to have a simple – but confusing – cause. Apparently, when I copied the directory from one project to another in Eclipse, Eclipse carried along the .svn directory for one of the template subdirectories. The existence of that directory confused Eclipse and Subversion, and sometimes made it look like I had checked everything in even though the templates directory was not versioned.
Moral of the story: if you copy versioned directories, make sure to remove any leftover .svn directories within them, or you risk losing things.