tags:

views:

206

answers:

3

I've got a file (mapViewController.m) which is in svn but I cannot commit changes to it. I tried to copy the file elsewhere and then update. The file does not come with the update so I copy it back. Then I can't commit changes to it.

This is hard to explain what is wrong... because I don't know.

A: 

It sounds like you're doing something fundamental wrong. Maybe you're trying to commit changes without having initially checked out the file, or perhaps you're trying to import instead of commit. In any event, I encourage you to read the documentation located here, which will get you started using SVN pretty quickly.

Michael Hackner
+2  A: 

The rule of thumb for all SVN problems is for when you can't figure something out, checkout a fresh copy to a new directory(if possible)

Try doing a fresh checkout and then replacing the file and then committing.

Also, make sure that you don't have to lock that file first.

It sounds a bit like you forgot to do svn add on the file(or Turotiose SVN -> Add). SVN does recognize directories, but it will not automatically add files in them. You must first add the file(through your subversion client), and then commit it to put it into subversion.

Earlz
+1  A: 

I've had that same error today, it was because I was trying to add a file (add not update) that already existed on the server. What I did was to save my version to an unrelated directory, update to the latest revision and then change the given server file with the one I saved locally, with my changes.

Tamar