So you’ve been working hard on your project and you’re ready to check in when all of a sudden Subversion throws you this weird error message: Attempted to lock an already-locked dir. “What the hell is this about?” you ask yourself. Well, Subversion is a really cautious fella and likes to bookkeep all of its transactions. So whenever you attempt to modify your working copy it’ll write its intentions to a log file, execute the commands in the log file, then remove the log file. If for one reason or another this process gets interrupted, this file still remains on disk.
So whenever Subversion ever tells you “Attempted to lock an already-locked dir”. You say nay, and type “svn cleanup” This command searches you current working copy re-runs any leftover log files and removes any locks in the process.
I personally use Subclipse, the SVN eclipse plugin. To get rid of this error in Subclipse, right-click the offending directory and click Team>cleanup.
Happy coding.