Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.
share|improve this question
    
Lacks information, like your configuration, your transport (HTTP/HTTPS), the messages on the server error log (the most important), if you are running a web-cache service between client and server, etc... –  Juliano May 25 '09 at 14:43
6  
Please add solutions as answers, rather than adding to the question –  Sam May 25 '09 at 15:08
    
Thank you for this! Just happened to me. –  Krisc Dec 19 '10 at 19:00
2  
I hate svn giving error and stop. It look like a child sniveling all the time. I reverted, than added then committed and magicly server acccepted. –  nerkn Jan 31 '11 at 1:39

11 Answers 11

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 :)

share|improve this answer
    
@Andrew -- well, you answered the question properly... @Sergio should have answered his own question. –  Josh Feb 26 '10 at 14:53

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:.

share|improve this answer
    
Great catch - I was just about to unleash the fury of the impatient programmer on my machine. :) You either need to recheckout the folder with https: (or if you're sneaky clear out the folder except for the .svn, then modify the contents of .svn/entries which has the url from http => https. Now the commit screen would show the https URL.) –  Gishu Jun 30 '10 at 9:44

I got the same error and managed to resolve it:

  1. SVN Rename the problematic directory to 'foo', or whatever
  2. SVN Commit
  3. SVN Rename back to the name you want
  4. SVN Commit

I'm not sure if this works in all cases, but it's simpler than deleting the parent directory.

share|improve this answer
    
thanks, easy enough and it worked for me –  krike Sep 18 '11 at 17:49

Does your svn repository allow commits via HTTP? Some repositories, like SourceForge, allow anonymous checkout via HTTP, but require developers to check in via svn and SSH.

share|improve this answer

In my case, I was having problems checking in files within a folder. I followed the steps Sergio outlined with a few changes.

  1. Copied the problem parent directory.
  2. Deleted .svn files in copied directory
  3. svn delete /parent_directory
  4. Commit
  5. Create new directory in repo
  6. Commit
  7. Move sub directories from copied directory to repo
  8. Commit
  9. Copy individual files
  10. Commit

I had a few files that I had challenges with. I left them out of the repository, but recreated them with a new name.

share|improve this answer

I had this problem when I removed a directory form SVN, and then recreated it, when I committed the new added directory, SVN yielded this error. I solved the problem by running a SVN up on the new added directory, and then resolved the conflicts manually.

share|improve this answer

Using Unfuddle, a hosted svn service, I repeatedly see this error when the .svn gets trampled by file copying in the OS X finder. The svn incantation that worked for me:

  • revert
  • update
  • delete the folder using the remote url
  • add and commit the folder
share|improve this answer

In my case, I was adding a new directory that my local (client) metadata assumed to already be on the server and Cleanup did not rectify it. I backed up all the new and modified files, deleted everything (except the root .svn folder), ran Update to restore the files, and copied back into the directory the new and modified files I had backed up. I added the new files again and committed successfully.

share|improve this answer

In Eclipse it is easy to fix.

Team > Switch to another Tag/branch

Select, fully recursive and check Change working copy to specified depth

Press OK

The folder's icon change. Right click and (team >) Mark Resolved.

That's it, now you can commit.

share|improve this answer
    
Bear in mind that Eclipse is a development tool, and not really the focus of ServerFault. –  Andrew B Mar 20 '13 at 23:17

Make a backup of the folder.
Delete the folder in the repository (using Repo-Browser).
Commit again.

Works fine for me.
Marcus

share|improve this answer

i had similar problem, i backed up the directory (just for safety) than update the svn folder. after that i could commit again. (and not used my backup)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.