Subversion error: (405 Method Not Allowed) in response to MKCOL

I am getting the following error while trying to commit a new directory addition.

svn: Commit failed (details follow):
svn: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for '....

I have never seen this error before. How can I fix this problem?

Solution
I managed to solve the problem:

  • Delete the parent's directory of the folder giving the problem.
  • Do SVN Update.
  • A folder with the same name as the new one already existed in repository.
  • Delete this folder.
  • SVN commit.
  • Copy the new folder, schedule for addition and SVN commit.

Solution 1:

This error usually indicated the folder you're trying to add already exists in the repository - have you done an update recently, or did you do a non-recursive checkout to start with?

I've previously encountered this error - found a blog that told me what the problem was. Solution was a little more complex, remove the directory in question from my working copy (copying it somewhere else), run a recursive update, then merge the two directories together manually.

Edit: Opps - already answered in question body. And here I was all excited that I knew the answer to an unanswered question :)

Solution 2:

I had a similar problem with MKACTIVITY on googlecode. It was because I had checked out the repository with http:, but check-ins required https:.