65

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.
Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
Sergio del Amo
  • 825
  • 1
  • 10
  • 16
  • 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
  • 7
    Please add solutions as answers, rather than adding to the question – Sam Cogan May 25 '09 at 15:08
  • 3
    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. –  Jan 31 '11 at 01:39
  • For google code repository see - http://stackoverflow.com/a/32636072/1406510 – nanosoft Sep 17 '15 at 17:09

12 Answers12

44

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

andrewc
  • 481
  • 3
  • 2
  • @Andrew -- well, you answered the question properly... @Sergio should have answered his own question. – Josh Feb 26 '10 at 14:53
8

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

Troy Daniels
  • 181
  • 1
  • 3
  • 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 09:44
  • http://stackoverflow.com/a/32636072/1406510 – nanosoft Sep 17 '15 at 17:08
5

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.

Sam Dutton
  • 151
  • 1
  • 2
4

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.

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
Dave Cheney
  • 18,307
  • 7
  • 48
  • 56
3

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.

Dawn Green
  • 131
  • 1
2

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.

imikay
  • 121
  • 2
1

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
xentek
  • 351
  • 1
  • 2
  • 7
0

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.

stimpy77
  • 429
  • 1
  • 5
  • 12
0

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.

0

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

Works fine for me.
Marcus

Marcus
  • 1
0

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)

Ohad Cohen
  • 131
  • 2
-1

I had an issue with e175002 200 OK. But I read that the path on the error message was talking about a wrong server, so the URL of my trunk was not the good one (http://localhost:80/path/to/my/trunk/) … wait ! LOCALHOST ?! ... And now I realize that it's because on my first rev my settings sent my project files to my repo locally … So on your first rev make sure your settings for the IP of your server is not wrong because after that... your repo will contain wrong informations, and you'll have to find a way to modify those bad settings on it, or on every client that want to use your repo for the first time.

My fix was to check on every folder of my project…. on every folder there is the .svn folder that store informations, and on every .svn folder a file called "entries" … In this file there is a path to the server, I replaced the bad line by the good IP in every entries stored in every .svn folders. And then no more errors.

Hope it helps. :) sorry if it's hard to understand my post ^^' I'm a try-harder.

Claod
  • 1