8

Ok ... so I wanted to upload something to an SVN server. How hard can that be? Well, turns out I've been using windumb for too long.

First I am supposed to "clone" the folder to my computer, using

svn co --username USERNAME URL

Alright, so I

cd ~/.../0.SVN
svn co --username USERNAME URL

and get an

svn: OPTIONS from URL: 200 OK.

Next, I create a folder ~/.../0.SVN/someFolder, put some files into that folder and want to add it so I can commit it.

 svn add someFolder

And now it's giving me an

 "." is not a working copy

And I have no idea what's going wrong because I'm basically doing exactly what the instructions I was given are saying.

6

Suppose that the URL was http://svn.example.com/somewhere/somerepo. Then svn co http://svn.example.com/somewhere/somerepo creates a subdirectory of the current directory called somerepo. That's where the svn checkout is located.

If you want to add more files to the svn repository, you need to put them under that somerepo directory.

cd somerepo
# create someFolder and put your new stuff there
svn add someFolder
svn commit

Use the command ls to see what files exist in a directory. Use ls -A to also see hidden files like the .svn subdirectory.

Use svn info to see what svn thinks about the current directory.


All this is assuming that the checkout was successful. If you ever see this message from svn:

svn: OPTIONS from http://svn.example.com/somewhere/somerepo: 200 OK

(or some other HTTP code: 403, 403, etc.) that's subversion's way of telling you that it did not understand the response from the server. Common causes are:

  • This is the wrong URL, the server at that URL is not a subversion server. Fix: type the correct URL.
  • You did not authenticate successfully. Usually you get a 403 HTTP status in that case, but some servers reply with 404 or even 200 (which is supposed to mean success, but some servers are funny that way).
4
  • What if the svn co command does not create a subdirectory?
    – User1291
    Sep 22 '13 at 13:23
  • @User1291 Oh, I wasn't paying enough attention. Unfortunately for you, “OPTIONS from URL: 200 OK” is svn's way of telling you that something went wrong when parsing the response from the server. Usually this means that either what's on this URL is not a subversion server, or that you did not authenticate successfully. Try the same URL in an anonymous window in your browser and check that you authenticated in the same way. Sep 22 '13 at 19:40
  • You mean to tell me that "OK" actually means "something went wrong"? Whatever idiot coded these errors should be slapped hard. Anyway, I checked the directory in a browser and after complaining about its nonexistance, it turns out I was given an old one. :P Thanks for the help.
    – User1291
    Sep 23 '13 at 12:40
  • @User The web server says OK because it is serving some content. It's svn's fault for reporting that instead of saying "I don't understand”. Sep 23 '13 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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