Reputation: 6908
1) I have the binary file that I wanted to replace with a newer version, so I copy the new file over the old one, and try committing it.
svn commit file.swf -m "message"
I get the error that there is a conflict and I need to update first
2) svn update . --force
Nothing.
3) svn revert .
File gets reverted, I can see the one from server now.
4) I copy new file over the old file and try committing. I get that there's still a conflict.
5) I try deleting it first from repo and then adding it and committing it again
svn del file.swf --force
D file.swf
svn commit . -m "message"
--no response
svn add file.swf
A file.swf
svn commit file.swf -m "message"
I get the error that committed file is on the server. What?? Yes, I check the online repo and the file is still there.
6) OK, so now I try reverting it back.
svn revert .
nada
svn update . --force
nada
Now I'm really confused and stuck. Neither I can delete the file from repo, nor get it back from server, nor commit a new file. How to get out of this mess?
Some more questions if you fancy, but the most important is to resolve it and get going.
Why at #4 the file still didn't get committed although I updated it before? Why at #5 I could not commit a deletion properly? Why at #6 if the file is not present locally, I still can't revert or update it from the server if it is there?
And most importantly, how do I replace the one on the server with a newer binary file? Was the route I took completely wrong?
Upvotes: 3
Views: 4425
Reputation: 15709
I had a similar - but not exactly the same - situation which I was able to resolve by specifying the actual file name (rather than just the directory) that I wanted to revert.
Others may wish to try that before going nuclear - but no guarentees :-)
Upvotes: 0
Reputation: 6908
I will answer my own question instead of removing it, maybe it helps someone.
The trick to get out of the mess was to go out of the folder with the binary, delete entire folder from disk, update it from svn and get it completely restored. Then copy the new binary over old one and do a normal commit.
Now everything is back in order. The main point it seems was to move out of that folder one level up.
Upvotes: 5