So - I used to have a directory called mysql a few revisions ago. I deleted it, and decided to start over - but when I try to create the new mysql directory - I keep running into the 'File Already Exists' error:
support:/etc/puppet/modules# mkdir mysql
support:/etc/puppet/modules# svn add mysql/
A mysql
support:/etc/puppet/modules# svn commit -m " Test"
Adding modules/mysql
svn: Commit failed (details follow):
svn: File already exists: filesystem '/var/lib/svn/puppet/db', transaction '11-r', path '/trunk/modules/mysql'
support:/etc/puppet/modules# svn delete mysql
svn: Use --force to override this restriction
svn: 'mysql' has local modifications
support:/etc/puppet/modules# svn --force delete mysql
D mysql
I saw some other posts suggest forcing an update
support:/etc/puppet/modules# svn status
support:/etc/puppet/modules# svn update
At revision 11.
support:/etc/puppet/modules# svn mkdir mysql
A mysql
support:/etc/puppet/modules# svn commit -m "Test"
Adding modules/mysql
svn: Commit failed (details follow):
svn: File already exists: filesystem '/var/lib/svn/puppet/db', transaction '11-s', path '/trunk/modules/mysql'
I had a problem like this when I deleted a folder (and sub-folders) and went to recreate them from scratch. You get this error from manually deleting and re-adding folders (whereas files seem to cope OK with this).
After some frustrating messing around, found I had to:
(using TortoiseSVN on Windows)
svn update
which added old files/folders back into working copysvn delete
foldercommit
commit
Unfortunately it (A) requires two commits, and (B) loses file revision history as it only tracks back to the recent re-add (unless someone can explain how to fix this). An alternative solution that works around these 2 issues is to skip steps 3 and 4, the only problem being that old/unnecessary files may still be present in your directory. You could delete these manually.
Would love to hear any additional insights others might have on this.
Simon.
[Update] OK, I had this same problem again just then, but the offending folder was NOT in the last commit, so an update
didn't restore it. Instead I had to browse the repository and delete
the offending folder. I could then add
the folder back in and commit
successfully.
Had similar problem. To resolve it, updated from svn trunk with option of priority of local files.
svn update path/ --accept=mine-full
After You could commit as usual. Of course, be careful using it.
already had this type of problem.
my solution was:
delete the folder from svn but keep a copy of the folder somewhere, commit the changes. in the backup-copy, delete recursively all the .svn-folders in it. for this you might run
#!/bin/bash
find -name '.svn' | while read directory;
do
echo $directory;
rm -rf "$directory";
done;
delete the local repository and re-check out entire project. don't know whether partial deletion/checkout are sufficient.
regards
I managed to work around it by reverting back to the last version that I had the mysql directory in, then deleting the contents of the directory, putting the new contents in it, and checking the new information back in. Although I'm curious if anyone has a better explanation for what the heck was going on there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With