Joe White’s Blog

Life, .NET, and Cats


Mere-Moments Guide to installing a Subversion server on Windows

Update: This Guide is now largely obsolete, because Brian wrote an installer that will do all this stuff for you. Check out his annoucement*, or go straight to the svn1clicksetup project page on tigris.

* Or you can check out my announcement about his announcement. It’ll work either way.

Subversion sounds pretty cool. It’s a mature, powerful revision-control system that acts a lot like CVS, adds support for atomic commits and real renames, just won the Jolt award, and is free. What more can you ask for?

I’ve been intending to install Subversion for quite a while, but I kept putting it off, because it looked like a daunting task. But when I actually decided to go do it, it took me all of an hour and a half to get it installed and working. If somebody had just written down what I needed to do to set up Subversion on Windows, with a real server running as a real Windows service, then it probably would’ve only taken me ten minutes, and I would’ve done it weeks ago.

Here, then, is the Mere-Moments Guide to installing a Subversion server on Windows. (It may look a bit intimidating, but really, it’s not.)

Some quick notes on the Guide:

  • These instructions assume you’re using Windows 2000 or XP. (You’d better be; the Subversion server won’t run on Win9x.)
  • If you want to know more about Subversion than just how to install it, check out the free O’Reilly Subversion book online and the not-free Pragmatic Version Control using Subversion.
  • For Subversion to do you much good, you’ll have to add a new “project” (essentially a directory) to your repository, to put files in. In these instructions, I’m assuming that your new project will be called monkey (because mine was).
  • Feel free to skip steps and to play around; you’ll learn more that way, because things won’t work right and you’ll have to figure out why.

And now, on to the Guide.

  1. Download everything
    1. Go to http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 and download the most recent svn-x.y.z-setup.exe. At the time of this writing, the latest version was svn-1.2.0-setup.exe.
    2. Go to http://dark.clansoft.dk/~mbn/svnservice/ and download SVNService.zip.
    3. Go to http://tortoisesvn.tigris.org/download.html and download the most recent installer. At the time of this writing, the latest version was TortoiseSVN-1.1.7-UNICODE_svn-1.1.4.msi. (It doesn’t have to be the exact same version as the svn installer you got in step 1. See the compatibility chart.)
  2. Install the server and the command-line client
    1. Run svn-x.y.z-setup.exe and let it install stuff.
    2. Go to Control Panel > System, go to the Advanced tab, and click the “Environment Variables” button at the bottom. Click the “New” button (either one, but if you’re undecided, use the one under “System variables”), set “variable name” to SVN_EDITOR, and “variable value” to the path and filename of a text editor of your choice (e.g., C:\Windows\Notepad.exe). OK all the way out.
  3. Create a repository and configure access
    1. Create a new directory somewhere out of the way; this is where your repository will live, but you’ll almost never actually open the files directly. I made a directory called svn_repos directly under my C:\Documents and Settings, just so it’d be out of the way.
    2. Open a command prompt and type: svnadmin create “C:\Documents and Settings\svn_repos”
    3. In Windows Explorer, browse to the C:\Documents and Settings\svn_repos\conf directory (which svnadmin just created for you), and edit a couple of config files:
      1. Open the svnserve.conf file in a text editor, and uncomment the [general], anon-access = read, auth-access = write, and password-db = passwd lines. Save.
      2. Open the passwd file in a text editor, uncomment the [users] line, and add the username and password you want to use when connecting to your subversion server. Save.
  4. Start the server manually, and create a project
    1. In your command window, type: svnserve –daemon –root “C:\Documents and Settings\svn_repos”
    2. Open a second command window, and type svn mkdir svn://localhost/monkey
    3. You’ll see the text editor you specified in step II.2, with some text already in it. Type a comment, like “Created the monkey project”, at the beginning of the file (before the line starting with “–”). Save the file and close the editor.
    4. If your Subversion login is the same as your Windows login, then type your password (the one you put in the passwd file) at the prompt, and hit Enter. If your Subversion login is different from your Windows login, then just hit ENTER at the password prompt, and Subversion will then ask for both your login and your password.
    5. Subversion should tell you that it “Committed revision 1.” Congratulations! You just checked a change into Subversion. Throw yourself a party. (Yes, creating a directory is a revisioned change — you can go back and get the repository as of a time before that directory existed. This is novel stuff for folks like me who still use VSS at work.)
    6. It’s conventional to have /trunk, /branches, and /tags subdirectories for each project (your code goes into trunk, and the others are where you put, well, branches and tags). Go ahead and type svn mkdir svn://localhost/monkey/trunk (and notice that, after you enter a checkin comment, it doesn’t prompt you for your password again — it’s smart like that).
  5. Start the server for real
    1. Go back to the command window that’s running svnserve. Hit Ctrl+C to stop it.
    2. Open the SVNService.zip that you downloaded earlier. Extract SVNService.exe into your Subversion bin directory (Program Files\Subversion\bin). Yes, it’s important that you put it in this directory; it has to be in the same place as svnserve.exe from the Subversion distribution.
    3. In a command prompt, type svnservice -install –daemon –root “C:\Documents and Settings\svn_repos”
    4. Go to Control Panel > Administrative Tools > Services, double-click the SVNService service, and change its startup type from “Manual” to “Automatic”. Now Subversion will start every time you start Windows.
    5. Start the SVNService service (by selecting it in the Services list, and clicking the “play” toolbar button).
    6. Go back to a command prompt, and type svn ls svn://localhost/
      This will list all the files in the root of the repository. If all is well and you’ve got a real Subversion server running now, you should see: monkey/
  6. Install TortoiseSVN
    Sure, you can get by with a command-line client, but TortoiseSVN is cool — it integrates Subversion into Windows Explorer. You get little overlay icons showing the status of each file (in sync, needs to be checked in, not yet in the repository, etc.), and you can do pretty much everything you need by right-clicking on files and folders.

    1. Run the TortoiseSVN installer you got back in part I.
    2. Create a monkey directory somewhere on your hard drive. Right-click somewhere in that folder and select “SVN Checkout…” Type svn://localhost/monkey/trunk/ for the repository URL and click OK.
    3. Create a file in that directory, any file. Right-click the file and select TortoiseSVN > Add. Notice the little plus-sign icon that appears.
      The file hasn’t actually been checked in yet — Subversion’s commits are both batched and atomic, so this new file, together with any other new files you added, any files you changed, any files you deleted, any files you renamed, any directories you added or deleted or renamed, will all show up on the server all at once, as a single revision and a single checkin, the next time you right-click and select “SVN Commit”.
  7. Make it run on the network
    Are you kidding? You’re already networked. Go to another computer on your LAN, install TortoiseSVN, and do an “SVN Checkout…”. When you specify the repository URL, use the same URL you did before, but replace “localhost” with the actual name of the computer that’s running the Subversion service (so in my case, the repository URL is svn://marsupial/monkey/trunk/ — nice little menagerie, there).

And there ya go — Subversion up and running on Windows, in mere moments or less.

Corrections, questions, etc. on this document are, as always, welcome; just speak up in the comments. Now go forth and control your revisions.

Also in the Mere Moments series: Mere-moments guide to creating custom ring tones for your Verizon RAZR V3m

314 Responses to “Mere-Moments Guide to installing a Subversion server on Windows”

  1. Naresh Jain Says:

    Great blog. Very helpful Thanks a ton.

  2. Sheldon Kotyk Says:

    It is tutorials like this that allow the regular person to use open source software.

  3. loading Says:

    Subversion install@debian

    Dalinuosi lameriška patirtimi ir kartu turiu konspekta:)

  4. Yuval Says:

    you are a god - very good work

  5. vuzman Says:

    Fuck eg hati tá fólk skriva ting á teirra egna máli. Tak teg saman og lær enskt, tín analfabet!

  6. Suvrayan Says:

    Asking for shell32.dll (ver-4.72 or higher) while Installing TortoiseSVN. How to solve this problem?

    Please help me. It’s urgent.

  7. Jupiter Moon Says:

    I can’t get SVNService to work.

    When I start the service it just stops straight away.

    In debug mode it comes up with this error:

    RegQueryValueEx failed with error 0, type 1

    The event log says:

    SVNService process ended prematurely: ("C:\svnserve\svnserve.exe" "-d" "-r" "d:\svnrepository")

  8. Joe White Says:

    Suvrayan: That’s already answered in their FAQ. See http://tortoisesvn.sourceforge.net/?q=node/40

  9. Joe White Says:

    Jupiter Moon:

    Like I said in the intro, if you deviate from the instructions, then you have to figure out why it doesn’t work. :-P

    Where did your C:\svnserve directory come from? Subversion installs into "C:\Program Files\Subversion" by default; did you install it somewhere else? That wouldn’t even explain that directory, though, because svnserve.exe is in a "bin" subdirectory; if you’re looking for it in C:\svnserve, then you’re doing something really wacky — moving programs into the wrong directories or something.

    If everything worked fine up until you got the error, then my best guess is that you did something weird at step V.2.

  10. Craig Peterson Says:

    Jupiter Moon:

    I ran into the same problem you had. I think the problem occurs if the LocalSystem account doesn’t have read access to your root repository, but I haven’t looked that closely. Try changing the service properties so it runs as your user account rather than the LocalSystem one. The "RegQueryValueEx failed" response is actually what it gives if it successfullly reads the registry.

    Joe:

    Thanks for the writeup. Other than the speed bump above it worked quite well.

  11. sotto Says:

    thanks.

    got it running in no time thanks to your description.

    Now it’s time to read the o’reilly book.

    btw, i didn’t install tortoise, but will try to use AnkhCVS, a VS.NET add-in

  12. Daniel Quintero Says:

    Buen Blog, Realmente muy facil de usar.

  13. amruta Says:

    Great Post!! Very very useful.

    Thanks a lot!

  14. Eppure si muove Says:

    Dude, your blog is superb; just like you said, you saved me a lot of work and research over multiple pages only to figure out how to install and setup subversion. Thanks a lot.

  15. Kohler Says:

    Great Guide saved me alot of time also. :)

  16. Dipankar Says:

    Great stuff, you’ve made installation of Subversion as easy as it is humanly possible

  17. Joe White Says:

    Oh, no — I’ve thought about making it as easy as humanly possible, and this isn’t there yet. :-)

    Someday I may try to make this document obsolete, by making one Subversion installer that does all this for you. *That’s* how easy it *should* be.

  18. Paul Hatcher Says:

    Any idea how to run more than one subversion repository, e.g. I want to have a Library repository for all the library modules and then a separate repository for each client’s work

  19. Joe White Says:

    Paul:

    Is there a reason you really need multiple repositories? It should be pretty easy to just create different directories, e.g., put your library stuff in /library/trunk, put your first client in /client1/trunk, etc. Keep in mind that you don’t have to check out the entire source tree on every development PC, nor does your checkout directory structure have to mirror the structure on the server; you can just check out /library/trunk to C:\Dev\Lib and /client2/trunk to C:\Web\Clients\ABC, for example.

    If you really do need multiple repositories for one reason or another, then I don’t think svnserve will do that. You’ll need to set up Apache instead, and I can’t walk you through that, because I’ve never done it. (But if you do get Subversion working with Apache on Windows, take notes and pass them along! It’s not as simple as svnserve, but it does offer things like SSL that svnserve can’t do.)

  20. speco Says:

    You are the man!(Woman!!) Whatever!

  21. Joe White Says:

    Man, as it happens. :-P

  22. Albie Says:

    Thanks a bunch. I’ve been reading the included help all day long, and for some reason couldn’t get svnservice to work. It turns out I’ve been clicking the "start" link found in the XP Services control panel. When I used the "Play button" as you describe, it works perfectly!

    I’m also now going to attempt the AnkhSVN plugin for Visual Studio instead of the Tortoise (which I’ll try later, I’m sure) - we’re going to be using Subversion here at work, for some major ASP.Net projects. A little victory for Open Source! *dances a little jig* woo!

  23. Joe White Says:

    Actually, the "Start" link and the Play button both do the exact same thing, so I’m not sure why one worked for you if the other didn’t. Sounds odd, but hey, whatever works.

    The only reason I said to use the Play button was because that’ll work on both Windows 2000 and Windows XP. (Win2k doesn’t have a "Start" link; that’s only in XP. But 2k and XP both have the Play button.)

  24. Collin Greene Says:

    A little snag to be aware of with the config files, there should be no spaces between the variable and the value in either svnserve.conf or passwd. Also any spaces at the end of lines make svn fail with a "svn: passwd:2 Option expected"-like error.

  25. Joe White Says:

    I don’t think you’re right about spaces in svnserve.conf. The sample conf file that svn creates does have spaces before and after the equal sign, and that works just fine.

    You may be right about the passwd file, though. (Haven’t tried it, but the working passwd file I’m using does not have spaces around the equal sign.)

  26. Albie Says:

    Hi. I’ve written another guide to getting Subversion up and running (had to refer to your guide), and getting it integrated with Visual Studio.Net, using AnkhSVN. If you’d like, you can incorporate that text into your guide. It’s a bit rough (I don’t blog) and not very well segmented, but I had to get everything down so people at my office can repeat the work I have done with Subversion. You can check it out at http://morph.telspace.co.za/docs/SVN4VSdotNet.html (my homepage link above). Thanks for the help!

  27. Rob Says:

    Thanks a bunch for the tutorial! :-)
    /me happy

  28. ashwin Says:

    Awesome tutorial! Helped me understand the basics . Got me going very quickly!Thanks again for spending the time to author this!

  29. Mike Winger Says:

    I’d have to say this has some helpful points.. but I found that when I used it, I had to uninstall svn and basically restart because it wasnt setup nearly the way i wanted it.. It might be more helpful to explain WHY your doing something, and what effect that has. rather than just telling the user to blindly follow all your instructions. It would result in a configuration that the user wanted in the first place.

  30. Joe White Says:

    I thought about that, but decided to focus the Guide on getting Subversion up and running as quickly as possible, rather than on the "why"s — partly because it would’ve taken a lot longer to write if I included the "why"s, and also would’ve taken longer for people to read and implement. I may come back to this later and write an expanded version, but I’ll probably keep the short version, too.

  31. Mike Winger Says:

    Ok.. I’ve setup this svn server through Apache. And have setup multiple repositorys. Joe White: The reason why people need multiple repostiorys, is because when you put two unrelated things in 1 repository.. If you add a revision to one project, it adds a revision number. then you have a revision where the other is untouched. This may not matter but what happens when you go to roll back? you can end up losing alot of information that way on one project or another.

    As for creating the multiple repositorys, what i did is this. Created a folder (C:\svn_repos) and then inside that folder, i created 3 new folders. C:\svn_repos\Client C:\svn_repos\Server, C:\svn_repos\Misc instead of doing svnadmin create "C:\svn_repos" do svnadmin create "C:\svn_repost\Server" and do that for all three folders. then when you login through Tortois svn.. do svn://localhost/Server and that will access the Server repo. I hope this helped someone. If anyone has any questions, email me at micheal.winger@gmail.com

    P.S: Joe White: you said you wanted to make an installer to do all this for you? If you actually plan to go through with that, email me and ill help you with it.

  32. Mike Winger Says:

    funny we are here at the same time.. My msn address is micheal.winger@gmail.com if anyone wants to chat about this also.

  33. Jaw Schteiger Says:

    I disagree, this a great tutorial. If you read the whole document and think about your needs ahead of time you should easily be able to modify the steps to suit your needs. Setting up source control is important; setting it up should take more than 10 minutes. Plus, are you sure you even need the different repositories.

  34. Siebrand Mazeland Says:

    Thank you for your clear tutorial, Joe. It helped me to setup a repo very quickly.

  35. Janos Erdelyi Says:

    Thank you for the simple and direct approach here in this article.

    i had looked at subversion on the Win platform a very long time ago (it feels like at least a year) and i got frustrated at the time and stopped trying.

    I just got the urge to get it on with some Continuous integration and your article has helped me get there.

    I do have a question though - i have my build file deploy files to a mapped network drive - at least i would like to.

    when i make a build file speciifically for this, and i run it from the cmd line, it functions perfectly.

    however, when i run the same stuff from the build file that Draco.Net automatically runs, i get "Could not find part of the path "O:\"." (i mapped the drive as O)

    could this be some weird permissions issue. i’ve been scrubbing around on google for an answer, but i must not be looking up the right terms.

    any help would be appreciated.

  36. Chris Says:

    Wow! Thank you very much! Keep up that good work! You just made my life a little bit easier ;)

  37. Kevan Says:

    Worked, first time. Thankyou!

  38. Caspar Says:

    Thanks to your tutorial, I got it working quicker than expected. Why isnt opensource soft accompanied by documents like these?

  39. Bart Says:

    Hit a stumbling block on step IV - 2.

    When I type:

    svn mkdir svn://localhost/monkey

    I get the following error:

    Can’t open ’svn-commit.tmp’: Access is denied.

  40. ebydelutece Says:

    nice job, u’re da man !

  41. Bart Says:

    In response to myself (to help anyone else with this issue):

    I got it work by using the statement:

    svn mkdir file///f:/svn_repos/monkey -m "initial creation"

    for some reason it really wanted that -m on there. Adding the -m was the only way I found to get the access denied msg to go away.

  42. Joe White Says:

    If you don’t specify the checkin comment on the command line, the svn client will create a temp file and open it in your SVN_EDITOR. Your "access is denied" error is saying it can’t create that temp file. I don’t remember whether it tries to put that file in the current directory or in your temp directory; but either way, it sounds like you may have some really peculiar file permission settings.

  43. Simon Says:

    thanks a bunch mate.. Subversion up and running without even sweating ;)

  44. AC Says:

    Fantastic! Thank you very much.

  45. Svyatoslav Lavryk Says:

    Great tutorial! Got my SVN running in several minutes ! Thanks !

  46. Bart Says:

    Got her working without too much effort (besides the little hiccup mentioned earlier) Thanks a bunch for the article! Loving Subversion so far. With this setup can we connect to the repo over http (or https) somehow? We’re smoking connected over the LAN now, but being able to connect via http would be nice too.

  47. Alvaro Says:

    Gracias, pude configirar mi servidor SVN en poco tiempo, claro para use SmartSVN en ves de TortoiseSVN

    Thanks!

    Chile

  48. Joe White Says:

    For HTTP and/or HTTPS, you’d need to set up Apache. I haven’t done that yet, so I don’t have any advice to offer — just look through the docs and give it a shot.

  49. patrizio Says:

    Excellent guide!

  50. Paul Says:

    Thanks a lot

    You are simply superb and it saved a lot of time

    Also if anyone can help me in doing the same with apache will be great

    thanks

    paul

  51. Helge Says:

    easy to understand - very useful - thx a lot!!!

  52. Chris Says:

    No really, I mean that.

    You are my new hero.

    Chris

  53. Brian Says:

    Ditto everyone else’s positive comments.

    Thank you.

  54. Morten Holdflod Møller Says:

    Sweet! :-)

    A really nice guide!

    - Morten

  55. Arnaud Says:

    Great tutorial, thank you very much for putting it together :)

  56. Collin Greene Says:

    Whoops, you are right, I was wrong about the spaces between the variable and the value. But I do get an error if I have the variable = value line at anything other then the same indentation as the region’s indent level.

    So this breaks for me:

    [region]

    foo = bar

    But this works:

    [region]

    foo=bar

  57. sweavo Says:

    you are God.

  58. Andrew Connell [MVP MCMS] Says:

    Now using Subversion for personal projects

  59. rob van der linden vooren Says:

    hi! great article on running subversion as a service on windows xp!

    i wrote a script removing the need to punch in a lot of commandline stuff yourself regarding the creation of the repository and installing the service; for anyone interested, click my name i guess

  60. Florian Fries Says:

    thanks. saved me a ton of work and hassle! like mentioned before, it’s howtos like this one that provide much easier access to great tools.

  61. rutity Says:

    Thanks, this is such an excellent guide! Thank you thank you thank you!

  62. http://lijktmeduidelijk.nl/?p=articles-running_sub Says:

    please note that to make SVN Server work over tcp/ip you will have to open the a port on your (windows xp) firewall

    SVN Service listens on port 3690 tcp to be specific

    after opening the port you can reach your server over the internet by typing:

    svn://yoursvnserver.org/

    where <yoursvnserver.org> obviously should be replaced by your own server address (or ip)

    ;-)

  63. Matt Woodward Says:

    Hey–great guide, but when I get to the very end I run into a snag. I’m doing this on Windows Server 2003 Standard Edition.

    Everything works great until I try to start the SVNService, at which point I get this error:

    Could not start the SVNService service on Local Computer.

    Error 203: The system could not find the environment option that was entered.

    Any ideas? I’ve tried running the service as my own user instead of the local system account, I’ve gone back through the instructions numerous times, and nothing seems to get me past this 203 error.

    Thanks,

    Matt

  64. Matt Woodward Says:

    Never mind–third time was the charm with uninstall/reinstall.

  65. Sanjay Says:

    Thanks for making it a breeze!

  66. Angus Rose Says:

    Excellent tutorial.

  67. Ed Y Says:

    Absolutely superb… and I was afraid that I couldn’t run a repository on Windows!

  68. Doc Bodkins Says:

    Thanks so much for this… you made me look like a real champ at work!

  69. Oboltus Says:

    Installation fallied :(
    I am stupid..

  70. Eben de Lange Says:

    Hey - I have the same problem as Matt Woodward. Matt: what did you uninstall/reinstall? The whole thing, or just the service?

    Any ideas how to get by this Error 203 would be greatly appreciated!!

  71. Eben de Lange Says:

    Okay, got it working. What I (think) I did wrong, was to extract SVNService to the bin\SVNService\ directory, instead of just SVNService\bin\

    The zip file has a folder SVNService in it, and I just extracted that and everything into the directory.

    Thanks - GREAT GUIDE!!

  72. Eben de Lange Says:

    Sorry - made a mistake in my previous page: should say "…instead of just \bin\".

    Apologies!

  73. Kalu Says:

    Hey, except Mohammed Ali, Your the Greatest!

  74. Cory Says:

    Thanks a ton, saved me a lot of time & frustration. Well written, too…

  75. Zandy Says:

    I have extracted svnsservice.exe into C:\program files\subversion\bin directory but am still getting the error 203. Please help!

  76. Jennifer Says:

    After I type this:

    C:\>svn mkdir svn://localhost/monkey

    The text editor opens with this:

    –This line, and those below, will be ignored–

    A svn://localhost/monkey

    I then add "#Created monkey project", save, and then exit.

    I then return to my cmd prompt and see this:

    svn: C:\Documents\svn_repos\conf\svnserve.conf:8: Section header must start in t

    he first column

    svn: Your commit message was left in a temporary file:

    svn: ’svn-commit.7.tmp’

    help please!!

  77. Zandy Says:

    It was just a stupid mistake - my subversion is nowworking!!! Joe White you are STAR!

  78. Thomas Says:

    For Jennifer: comments has to be entered without "#"

    Please beware the syntax for installing the SVNService has change a bit - look at the examples (use -d instead of –daemon and -r instead of –root)

    This is awesome - owe you big time Joe White!!!

    Regards Thomas, Denmark

  79. JD Says:

    Great tutorial Joe. I have run into a problem that has been mentioned here more than once. I did not get error 203 in my case but I get an error that says,

    "Could not start the SVNService service on the Local Computer …"

    I have tried changing the "log on as" to administrator in services re-install ETC … with no positive result.

    BTW, I SVNService.zip was extracted into Program Manager/Subversion/bin.

    Any help will be greatly appreciated

  80. brijesh Says:

    Hi,

    I am trying to install subversion following the steps given here. Everything goes fine till i try to start the svnservice. I get the following error message

    " Could not start the SVNservice service on local computer

    Error 203: The system could not find the environment option that was entered"

    Am using Windows XP.

    Thanks,

    Brijesh

    "

  81. Mark Says:

    I am having the same problem as jennifer and tried as "Created monkey project" and Created monkey project and #created monkey project and still get same error as she did

  82. Eric Asberry Says:

    Your little tutorial was just what I needed to overcome intertia and get started using Subversion. If I’d known how easy it was (if you know what you were doing of course) I’d have done it long ago. :)

  83. JD Says:

    Mark remove the white spaces before the lines you uncommented in the config and password files and it will work.

  84. Mark Says:

    JD, Thanks, got it working today. This was my project at work to complete and I finally got it up and running. Thanks for the help and the tutorial. Just one question….how secure is this?

  85. Joe White Says:

    Well, people need logins and passwords to modify files in your repository (and you can require logins for reading the repository, too, if you set it up that way). So as far as logins go, it’s as secure as you want to make it.

    If you’re asking whether the data is encrypted as it goes across the wire, the answer is no. For that, you’d need to look into either SVN+SSH, or Apache (with HTTPS). I’ve never set up either, so I won’t be too much help. I do have a link to a Windows SSH server — see http://excastle.com/blog/archive/2005/08/10/2011.aspx — but I’m not sure what it would take to set that up to play nicely with Subversion’s svn+ssh protocol.

    If you get either SVN+SSH or Apache-with-HTTPS working on a Windows server, let us all know!

  86. Alexandr A. Sperchun (Ukraine) Says:

    Thank you, good work.

  87. JD Says:

    Folks,

    I really need help with the problem I have stated above. I tried the remedy described above without any luck.

    re: "Could not start the SVNService service on the Local Computer …"

    This error shows up in an MMC window when I try to start the SVNservices. Also in my case there is no error 203 as displayed for others.

    Thanks in advance.

  88. Joe White Says:

    JD: Here are the first questions that come to mind…

    1. What OS are you using?

    2. What’s the full error message? (You put "…" at the end of the message both times you posted, but you said it wasn’t the error 203 others have gotten — what was the rest of the error message you did get?)

    3. Does anything show up in the Event Viewer (I’d probably check the Application Log first, but if there’s nothing there, check the other logs as well) stamped with the time you tried to start the service?

    4. Did you put svnservice.exe into the Subversion\bin directory? Did you have it in a different location at any point in time (and if so, did you re-register the service after you moved the EXE)?

  89. Brijesh Says:

    JD,

    I was facing the same problem earlier. Here’s how I solved that:

    I unzipped SVNService.zip such that SVN application and SVNService application are in the same folder (C:\Program Files\Subversion\bin in my case).

    Hope this will solve ur problem too.

    Thanks,

    Brijesh

  90. Thomas vK Says:

    Hey!

    Very nice tutorial, it got me set-up SVN in only a few minutes while before this I didn’t want to install SVN for months because I thought it would be difficult!

    One little question though… if I follow your tutorial and I want to check out the monkey on another PC, for some reason it didn’t work with svn://svn-server/monkey/trunk but only with svn://svn-server/monkey. Did I miss something?

    Again: great tutorial!

  91. JD Says:

    Joe and Brijesh,

    Wired thing just happened. I was in the middle of answering the questions Joe asked so I logged onto the server which BTW is running WIN2K and attempted to start the SVNService so I can copy the exact error message I was getting but I did not get it, instead it started right away. I did nothing different from what I was doing last Thursday.

    I moved the SVNService from the SVNService folder as someone pointed out earlier on Thursday without any success. Maybe it required a reboot or something after such a change. Anyway, thanks very much for the positive response.

  92. Jennifer Says:

    Hi!

    I’m still getting the same errors as 8/30/2005, 10:24 AM. I didn’t put the "#" and I took out the white spaces in the files.

    Here’s what passwd looks like:

    ###…

    ###…

    ###…

    ###…

    [users]

    jen = password

    # harry = harryssecret

    # sally = sallyssecret

    Here’s whwat the svnserve looks like:

    ###

    ###

    ###

    ###

    ###

    [general]

    ###

    ###

    ###

    anon-access=read

    auth-access=write

    ###

    ###

    ###

    ###

    passwrord-db = passwd

    ###

    ###

    ###

    ###

    # realm - My First Repository

  93. Brian Kohrs Says:

    I have created a wizard that walks you through the steps that Joe has documented here. You can find the project up on tigris at http://svn1clicksetup.tigris.org

  94. Tim Says:

    Finally - after four months I have a working SVN repository.

    Now it’s going to be another 4 months to teach the parents to use it = )

  95. Diarmuid Says:

    Wicked,

    Up and going in 15 minutes. Now if you could do one for cruise control.net that’d be cool.

  96. JD Says:

    Here is my next obstacle:

    I get the following error when I try to run the command "svn ls svn://localhost/"

    C:\Documents and Settings\Administrator>svn ls svn://localhost/

    svn: Can’t connect to host ‘localhost’: No connection could be made because the

    target machine actively refused it.

    C:\Documents and Settings\Administrator>sv

    I am running windows 2000 with no installed firewall application. Any suggestion is much appreciated.

  97. JD Says:

    Here is my next obstacle:

    I get the following error when I try to run the command "svn ls svn://localhost/"

    C:\Documents and Settings\Administrator>svn ls svn://localhost/

    svn: Can’t connect to host ‘localhost’: No connection could be made because the

    target machine actively refused it.

    C:\Documents and Settings\Administrator>sv

    I am running windows 2000 with no installed firewall application. Any suggestion is much appreciated.

  98. Brian Kohrs Says:

    JD,

    That error message is telling you that the SVNService is not running on you local machine. Look in services to see if SVNService is there. If it is, make sure that the service is running.

  99. JD Says:

    Brain,

    SVNservice is there and is running.

    I am forced to reboot the machine whenever I want to stop and restart the SVNservice. But it is there and running when I get the above error.

    Any help will be greatly appreciated.

    Thanks.

  100. JD Says:

    Follow up to the above listed probelm.

    I am having huge problems with installing and running svnservice. Everything works well until I try to start the service. I have tried to do this on three different windows boxes.

    Although the service show it as running after I reboot, a refresh reveals it was not. I don’t know what else to do. Ayy suggestions would be greatly appreciated.

  101. Joe White Says:

    JD:

    I didn’t see that you’ve said anything about the Application event log. Does it show anything at the time when you tried to start the service?

    Did you make sure to put SVNService.exe into the same directory where the Subversion binaries were already installed (typically C:\Program Files\Subversion\bin\SVNService.exe, right alongside svnserve.exe)? And if you previously had SVNService registered in the wrong directory, you’ll probably need to unregister it, then re-register it in the right directory. (After you unregister it, refresh the Services list and make sure it’s gone — I’ve had problems with other services not unregistering gracefully after I’ve moved them to a different directory.)

    Have you tried Brian’s installer yet? It might or might not help on a computer where you had already registered SVNService in the wrong directory, but it certainly ought to work on a PC that hasn’t had Subversion installed previously.

  102. JD Says:

    Joe,

    The SVNservice.exe is in the same directory where subversion binaries are already installed right along SVNservice. Somehow the system tries to start SVNserve instead of SVNservice when you try to start that (SVNservice) service.

    The Application Event logs that show up are as follows:

    “SVNservice process ended prematurely (“C\Program Files|subversion\bin\svnserve.exe ““-d” “-r” “C\Documents and Settings\svn_repos”

    This is so even though I can see SVNservice and SVNserve in the bin folder under subversion in Program Files.

    I removed the SVNserve.exe and got a 203 error code that stated

    “The system could not find the environment option that was stated.”

    I wouldn’t mind giving your registration theory a go. It makes sense. Does that mean I have to do it in regedit? If so do you know where it would be?

    Thanks.

  103. Asif Says:

    How to create a new project instead of "monkey" ?

    I am trying to create a real project for my application.

  104. JD Says:

    Joe ‘et al’,

    I have found out why the svnservice did not work for me.

    The command:

    svnservice -install –d –r "C:\Documents and Settings\svn_repos"

    was what I was using to start up svnservice and that did not work.

    YOu have to write up daemon for it to work on all the systems I installed the server on.

    Thanks.

  105. Sasha Says:

    Hi,

    How to associate a JBuilder project with Subvesion ?

  106. Joe White Says:

    JD: What do you mean by "write up daemon"?

  107. JD Says:

    Joe I mean spell it out. I was doing a –d earlier. I had to do a –daemon when installing SVNservice for it to allow me to automatically start it.

  108. Ravi Says:

    Fentastic, this made my job easier & saved the time

  109. JD Says:

    Agreed! Thanks Joe.

    Now I need to make it work over a web server. If only there is eomthing owesome as what you provided.

    Good job.

  110. danprime Says:

    Hey All,

    Thanks for the informative post/blog. I like seeing how things work piece by piece instead of letting things go automatically.

    That beings said I found that the last part where you try to list all the projects "svn ls svn://localhost/" doesn’t work on my WinXP box.

    I find that I need to type in: "svn ls file:///c:/svn_repository/" to get it to list.

    Any suggestions as to why that is?

    Thanks!

    Dan

  111. Joe White Says:

    danprime:

    What do you mean by "doesn’t work"? What happens when you try?

  112. danprime Says:

    Hey Joe,

    Thanks for getting back to me.

    When I type in "svn ls svn://localhost/"

    It says

    "svn: No repository found in ’svn://localhost’"

    (to make it "work" I need to type in svn ls file:///c:/svn_repository"

    However, I’m able to create projects using

    svn mkdir svn://localhost/monkey

    but to "check out" I have to use

    "svn co file:///c:/svn_repository/monkey/"

    instead of

    svn co svn://localhost/monkey/ (it gives me a similar error message: "svn: No repository found in ’svn://localhost/monkey’"

    I installed SVN on the default program files directory and have checked to make sure that the svnservice is running.

  113. Asim Says:

    I have different user on project who can access repository.

    All of them should have different set of permissions e.g. read-only, read-write.

    Can you explain in details, how to establish this type of security layer.

    Thanks

  114. Joe White Says:

    danprime: Stop the service, and try just running svnserver from the command prompt (see step IV.1). Then open another command-prompt window and try svn ls. Can you make it work that way? I’m guessing something may be wrong with the command-line parameters that got registered with the service, and that’d be a lot easier to troubleshoot if the service isn’t in the mix.

    Asim: If you only give logins to the people who need read-write access, then that will take care of what I think you’re asking. Is that what you need, or do you need something more flexible than that (like per-directory permissions)? Svnserve is fairly simple, and isn’t meant to handle complicated scenarios; if you need a lot of flexibility, you’ll need to look at setting up svn with Apache (and I can’t help you with that, since I’ve never done it).

  115. Red-3 Says:

    Thankyou thankyou thankyou.

    I installed the SVNService (in the same directory as svnserve) and had problems with the "connection actively refused". I then ran it again after reboot and it said it was already installed as a service. What it didn’t tell me was that the service was not actually RUNNING! Your post helped me out no end - I went into the Admin tools in Control Panel and started ‘er up.

    thank you.

  116. danprime Says:

    Thanks for the reply! I got it working (I’ll just list all the steps I took)

    I stopped the service and ran the server from the command line and was able to get a list of the projects using svn ls svn://localhost/

    I tried to re-install the service but found I needed to remove the service by typing:

    "svnservice -remove –daemon –root "c:\svn_repository" (or whichever path your repository points to).

    Then re-installed it following the instructions and it now works fine.

    Thanks again!

  117. Vicenç García Says:

    Great document! All works perfect!

    Thank you very much!

  118. Mark Says:

    Thanks man. That helped loads. Send it to the Subversion developers, they should include this in their guide.

  119. Unknown Says:

    Thanks Joe ! I installed SVN first time in my life after using several years of CVS and migrated to SVN and the process was simpler just because of your article.

    Just a suggestion:

    Why can you write something very similar and simple to understand on Setting up something like…

    1. IIS with security or like

    2. Simple steps on Setup Windows Security

    3. Or Migrating from Some Database to MySQL etc.

  120. PukiWiki/TrackBack 0.1 Says:

    SVN - Subversion Links

    SVN for windows http://excastle.com/blog/archive/2005/05/31/1048.aspx

  121. Luke Pryor Says:

    I too have had the error message:

    "SVNService process ended prematurely: ("C:\Program Files\Subversion\bin\svnserve.exe" "–daemon" "–root" "E:\svnrepos")" in the Application Event Log

    I have installed Subversion on the C: drive of our Win2K server. The repository is located on E:\svnrepos.

    It would appear that this is just a permissions problem. I opened up the properties of the SVNService service and changed the log-on account from "Local System Account" to my own Domain User account. The service then started correctly.

    I checked the security settings of the E: drive and discovered that only MYDOMAIN\Domain Admins have permission to access it. This would explain how I can run the service as my own account.

    However the problem I then encountered is that when I give the "SYSTEM" account privileges for the E: drive it still doesn’t work. Has anyone else had this problem? I’ll be discussing this with my SysAdmin later and will let you know if we find a resolution.

    P.S. I have set it up on my own workstation 100% fine, running the Service as a Local System account, however this is not what we need - it has to be on a network file server.

  122. Luke Pryor Says:

    Fixed it.

    There’s a strange quirk of NT permissions (although maybe it’s normal - I don’t know). But if you have your repository directory on a different drive (mine’s on E:) then SYSTEM account needs to have permission to access that drive AND the repository directory.

    However, the SYSTEM account only needs access to these two bits of it so you can happily remove the SYSTEM account from other directories on the same drive (e.g. we have E:\Finance Docs that’s very strictly controlled) if your SysAdmins require.

    Hope this helps.

  123. Phil Says:

    I moved the SVNService.exe to my install/bin dir (C:\Program Files\Subversion\bin) and changed the path for the service in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SVNService)

    to ImagePath = C:\Program Files\Subversion\bin\SVNService.exe

    works fine for me :-)

  124. F/\R Says:

    Nice work.

  125. William Says:

    Great Post!! Very useful.

    Thanks a lot !

  126. yopyop Says:

    How to have multiple repository on one Svn server to have no unique revision number.

    I want to have multi project with a different revision number for each.

  127. Günter Dannhäuser Says:

    On the topic of having svnserve serve multiple repositories (Mike Winger already wrote on this) again:

    you can have multiple subdirectories, e.g.

    c:\svn-root\project1

    c:\svn-root\project2

    in your svn-root-directory (the one you declare "root" with "svnserve -d -r c:\svn-root". This directory becomes the virtual root, accessible via svn://localhost.

    Each of the sub-directories can hold its own repository (just create it there using tortoise or whatever). The directory names become part of the repository URL, you can access them using svn://localhost/project1 etc.

    When using Apache to serve multiple repositories, a common way is to use the <location> directive, e.g.

    <location /svn>

    DAV svn

    SVNParentPath c:/svn-root

    </location>

    to set the "virtual root". In this case, you´d access the repositories using http://localhost/svn/project1 etc.

  128. gokhan Says:

    Thanx 4 savin’ my this much time!

  129. shiznitzel Says:

    Absolutely Awesome Tutorial!! SVN all the way!

  130. Ralph Willgoss Says:

    Hi Joe,

    Great tutorial!

    This helped me get Subversion up and running ages ago.

    I was inspired such that I’ve been in the process of writing a complete guide for setting up a development environment for developing ASP.Net apps and using Subversion for source control plus the many other little bits and pieces in between.

    Its now available here:

    http://www.geekswithblogs.net/rwillgoss/archive/2005/10/20/57506.aspx

    I’d love feedback on other things I could add.

    Thanks!

  131. Eugene Says:

    Wonderful!!

    Just what i was looking for. All neatly written in an easy to understand way. Thanks a ton !!

  132. .Avery Blog Says:

    Subversion

  133. matt Says:

    thanks a million, after 4 hours I ran out of energy trying to get all the svn moons aligned, and then found your article and was up and running in 5!

    -reading the tsvn help file yielded nothing of any practical use, perhaps there were virtual pages missing??

  134. B. K. Oxley (binkley) Says:

    To work properly as a service, I needed to grant SYSTEM recursively full permissions to the repository directory.

  135. Neal Says:

    Thanks for a great tutorial. I decided to try and implement apache with subversion and found it wasn’t that difficult. Per your request, I am posting the steps I took to get it working on my Windows XP system.

    1. Follow Joe’s subversion for windows installation tutorial above (or run Brian’s wizard)

    2. Install Apache 2.0.55 by downloading and installing: http://www.apache.org/dist/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.msi

    3. After the installation finishes, run the following from a command prompt: "net stop apache2" (to stop the web server)

    4. If you DON’T want/need SSL support, skip to step 9b below.

    5. Rename httpd.conf in the apache config. directory (default is "c:\program files\apache group\apache2\conf") to httpd.conf.save

    6. Browse to "http://smithii.com/ross/download.php?file=apache-2.0.55_openssl-0.9.8a.zip&PHPSESSID=d28a8ca348810baeaa51c0ae16d897a0&quot;, answer the questions and download and open the zip file (assuming you are allowed to do so).

    7. Extract files from the zip you just opened to the base apache install directory (default is "c:\program files\apache group\apache2"). Be sure you preserve the folder names when extracting (i.e., don’t just extract all the files to the same dir.)

    8. Open ssl.conf in the apache configuration directory with notepad and change as follows:

    a. Change "<IfDefine SSL>" to "#<IfDefine SSL>"

    b. Change "</IfDefine>" to "#</IfDefine>" (last line of file)

    This avoids the requirement of starting apache with the "-DSSL" parameter (which I couldn’t get to work when running apache as a service).

    9. Open httpd.conf in the apache configuration directory with notepad (default is "c:\program files\apache group\apache2\conf") and change the contents as follows:

    a. Replace all "d:\test\apache2" with "c:\program files\apache group\apache2" (or whatever your base apache install directory is). Hint: Ctrl+H in notepad will allow you to do find/replace

    b. Uncomment (remove "#") from "#LoadModule dav_module modules/mod_dav.so"

    c. Add "LoadModule dav_svn_module modules/mod_dav_svn.so"

    d. Add the following to the bottom of the file:

    <Location /svn>

    DAV svn

    SVNPath "c:/documents and settings/svn_repos"

    </Location>

    Ensure you change the directory in SVNPath to be the actual location of your repository that you created when you installed subversion as part of Joe’s tutorial. If you want more than one repository, you can create additional <Location> blocks. This example will allow you to browse to "http://localhost/svn&quot;. If you want a different URI for your repository, change the path after "<Location …" line. Note: The above changes are NOT intended as "all you need" regarding apache configuration. It’s only intended to get you a running example with subversion. You should review the manual and make any other configuration changes you deem appropriate (Hint: "http://localhost/manual&quot;)

    10. Copy the following files from the subversion bin directory (default is "c:\program files\subversion\bin") to the apache bin directory (default is "c:\program files\apache group\apache2"):

    libdb43.dll

    intl3_svn.dll

    mod_authz_svn.so

    mod_dav_svn.so

    11. From a command prompt, run "net start apache2".

    12. If it fails to start, examine the Application event log. It should describe the error in enough detail for you to fix it (generally a configuration file error is the culprit). If you get a "not found" error loading module "mod_dav_svn.so", then ensure you completed step 7 above correctly.

    13. From a command prompt, run "svn ls https://localhost/svn&quot; (use http instead of https if you didn’t install the SSL support) and it should display the root of your repository.

    14. Further reading (for authentication and for authorization):

    http://geekswithblogs.net/flanakin/archive/2005/08/31/51743.aspx

    http://www.subversionary.org/sspidomainauth

    http://www.erenkrantz.com/oscon/OSCON%202003%20Subversion%20WebDAV.pdf

    I believe this captures everything I just did to get subversion working with apache 2.0.55 including SSL. Hopefully, someone will find this useful.

  136. Gromadusi Says:

    u saved me hours of tedious work….thanks alot!!!!

  137. Subhas Sing Says:

    I have no words to say some thing !!!

    Thanks.

  138. Marcelo Says:

    Very, very good tutorial.

    I was figthing with SVNService not installing near 2 hours.

    Until I saw that "-install" must have only a single dash ( because it’s an option to SVNService itself ), whilst "–daemon" and "–root" are double dashed, because they are options to vncserve.

    Of course, the problem is not the tutorial. It’s my own stupidity.

  139. Floyd Says:

    Hello,

    ich have complete step 1-3 but on step 4.1 i have a problem.

    My SNV direktory ist D:\svn.

    If i run this commandline it will be do nothing. i must break up the command because it blinks only the cursor and nothing will be do.

    D:\Dokumente und Einstellungen\Administrator>svnserve –daemon –root "d:\svn"

    Please dont be surpiced, its a german windows :D because i came from germany :D please sorry my bad english.

  140. Joe White Says:

    I don’t know what you mean by "break up the command", but it sounds like it’s working just fine. When you start svnserve, it’s supposed to just sit there. That’s because it’s busy listening for connections. (And that’s why you have to open a second command-prompt window for the next step - because this one is busy running svnserve.)

  141. Floyd Says:

    sorry, my english does not so good :D i’m happy if i can read an english text and anderstand him :D

    oky "break up the command" means Ctrl+C

  142. Floyd Says:

    oky i have understand. now i have a problem with the mkdir command.

    i have got this error:

    D:\svn\conf\svnserve.conf:12: Section header expected

  143. Floyd Says:

    Created the monkey project

    – Diese und die folgenden Zeilen werden ignoriert –

    A svn://localhost/monkey

  144. Floyd Says:

    my srnserve.conf:

    # [general]

    anon-access = read

    auth-access = write

    password-db = passwd

    realm of the repository.

    realm = My First Repository

    i think i’m agans online at tomorow at the same time.

  145. Nikisha Gala Says:

    I had a question about installing Subversion on the server. If I understand this correctly, we want to set up a repository on the server(windows 2000 running tomcat) and clients on our pcs and through the web. I’m new to subversion or setting up any version management s/w. Could you tell me if the one click method would do this or is it only for single users?

    Thanks much

    Nikisha

  146. Joe White Says:

    The one-click installer will work fine for multiple users, although I think it only sets up the first user for you. If you want to add more, you’ll have to manually edit the config file.

  147. Nikisha Gala Says:

    Thanks for the info. Do I use the one-click installer on the server or on my PC?

    -Nikisha

  148. Prasanna Veeramani Says:

    really very helpful page :)

  149. Joe White Says:

    You would mainly use the installer on the server. You can also use it on the clients, but there you would want to skip the step that installs the server.

    The main thing you need on the clients is TortoiseSVN, and you could just download and install it. However, sometimes it’s nice to have the command-line tools as well, in which case the one-click installer is a little handier (it installs both command-line Subversion and TortoiseSVN).

  150. Nikisha Gala Says:

    Ok. Thank you for all your help. That clarifies alot of things for me. I really appreciate it.

    -Nikisha

  151. Anil D'Souza Says:

    I have never seen such an detailed guide before. It is one of the best guide I have ever seen. I was able to get subversio up and running withing no time.

    Keep up the good work

  152. Jason Says:

    If you want to have a more advanced setup using Apache and Subversion together, there’s a walkthrough available here:

    http://www.verysimple.com/support/viewtopic.php?p=392

  153. Corky Says:

    I got everything up and running quickly using this guide. Many Thanks. I do have one question: In order to allow remotely located developers to check in/check out code, is Apache required? I was able to open the subversion port and a remote colleague was able to "see" the repository from a command like like so: svn://myIPAddress/myrepositury/trunk/

    but the remote checkout using Tortoise did not seem to work.

  154. Joe White Says:

    This should work just fine for remote access, as long as the remote users can connect to the SVNServe port (3690). If your repository is behind a firewall, and the remote users are outside that firewall, you’ll need to set up some port forwarding on your firewall.

  155. Curt Says:

    I am also getting the same error that Jupiter Moon received. I am running Subversion 1.2.3 on Windows 2000.

    I can run `svnserve -d` and that works, but obviously isn’t a long term solution. When I used SVNService, I issued the command:

    > SVNService -install -d -r C:\svn\projects\

    I did not receive and error, but I could not longer remotely connect to my repository… in fact, I couldn’t access the repository locally using the URL. I can confirm, though, that port 3690 is open and and telneting to it gives me:

    ( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) ) [a heart shape character]

    When running `SVNservice -debug` I receive the output:

    Debugging SVNService

    Setting working directory: C:\Program Files\Subversion\bin\

    RegQueryValueEx failed with error 0, type 1

    Running command: "C:\Program Files\Subversion\bin\svnserve.exe" "-d" "-r" "C:\svn\projects"

    I tried changing the account running this service from LocalSystem to Administrator, but that did not work. There are no other local accounts on this machine (only Novell groups) and I don’t have authorization to create new accounts.

    Any ideas as to what might be wrong??

  156. Joe White Says:

    I just looked through the SVNService source code, and a question that comes to mind is: What user were you running as when you ran SVNService -install?

    It looks like, when you do the -install, SVNService takes the rest of the command line and writes it to the Registry, as a value called CommandLine under the key HKEY_LOCAL_MACHINE\Software\ClanSoft\SVNService. But when it *writes* the value, it doesn’t look like it does any error checking. So if you’re not an admin when you do the -install, it wouldn’t be able to write to HKEY_LOCAL_MACHINE, so it couldn’t create the value; but because of the lack of error checking, it might not actually *tell* you that it had failed. Later, of course, when it tries to read the value back, it *does* check for errors, sees that the value isn’t there, and dies.

    So if you weren’t logged in as an admin when you registered it before, then try logging in as an admin, unregistering it, and re-registering it. See if that helps.

  157. Corky Says:

    When I do an intial checkout, all I get is a .svn folder, with several folders under it. I don’t get any source code.

  158. Sima Says:

    I cannot find any documents on how to use AnkhSVN. Can anyone help. thanks

  159. Bill Says:

    Just wondering, what is the best way of going about doing this as far as OS is concerned…Linux or Windows or doesn’t matter?

    Our Eng. dept have two different project going on…one in Windows env. and other in Linux, dealing with two dissimilar applications.

    Thanks.

  160. Joe White Says:

    The server can be on either Windows or Linux (among others), and the client can be on either Windows or Linux (among others). You can mix and match all you want, i.e., you can have a Linux server with Windows clients, or vice versa. Just depends on what sort of machine you have available to be a server. You might be a little better off with a Linux server since there are more people running it that way and fixing any issues that come up, but we’ve been running a Windows server for a few months now with no problems. (’Course, we’re actually using Apache these days, instead of svnserve.)

  161. Josh Says:

    So I’m sure this is a simple problem, but for me, the service stops as soon as it starts.

    Is this an easy fix?

  162. Jaswinder Says:

    Great article. Really helped me. I was first going to use CVS, then decided to go with SVN. I was having trouble with everything (from isntallation to manage). I just read this tutorial line by line, and voila, its working.

    Thanks for this article for people like me.

  163. sima Says:

    Is there any way to share files in Subversion like VSS?

  164. Joe White Says:

    Sort of, but you don’t want to do it. It’s the same principle as refactoring: you don’t want duplication. VSS shares caused us no end of headaches (and we were happy to use the port to SVN as an excuse to get rid of them all!).

    That said, you can sort of "share" in Subversion, but only at the directory level, not individual files. You do it using the "svn:externals" property. It’s meant for pulling in files from an external repository (hence the name), but you can use it for other files within the same repository, as well. But if you use it that way, you’ll have headaches when you tag and branch, since your branches will still be pulling content from the trunk (unless you update them manually after you branch).

    You can find more info on svn:externals at http://svnbook.red-bean.com/en/1.0/ch07s03.html.

  165. Sima Says:

    Joe, thanks for your reply. I have another question. does Subversion supports pining (one of VSS functionality)?

  166. Joe White Says:

    I’m not really even sure how pinning works. I suspect that you might be able to accomplish similar things with branching and merging, but I don’t know for sure. Could you describe a scenario where you would use pinning, and how it would work?

  167. Sima Says:

    How can I pin a file or folder in Subversion? Thanks

  168. Ankit Says:

    Hi i m using working folder one from client to get latest code from client repository and one local repositoty for local changes.Now if i updates some code in local working folder than how to update the code in client side .

    iF i just copy the code without .svn folder from local copy and paste it in client working folder ,now if i try to update the code then it says no code to update.

    Please give some solution.

  169. Gajanan Says:

    Hi,

    I am running subversion under apache at home, and i am able to access the repository from within my home lan, both from a browser as well as from eclipse(using subclipse). Also, I have setup port forwarding on my dlink router for port 80.

    But from outside the lan, I am able to access the repos from a browser, but not from eclipse.

    Any idea, if eclipse(or subclipse to be precise) uses a different port than port 80?

    Thanks

  170. John Fisher Says:

    Worked like a charm … I’m completely in love with you right now.

  171. Anvar Says:

    When running the SVNService I am getting the error message

    Could not start the SVNServies at the Local Computer

    Error:203 The system could not found the environment options that was entered

    but I have set two environment variables

    APR_ICONV_PATH = C:\Program Files\Subversion\iconv

    SVN_EDITOR = c:\winnt\notepad.exe

    can you help?

    Thanks,

    Anvar

  172. Joe White Says:

    Those environment variables are for Tortoise, not for SVNServe; SVNServe doesn’t care about them. So something else is wrong. Check your event logs (system or application, I don’t remember which) and look for events from the point in time where you tried to start the service.

  173. arlene Says:

    I’ve read your tutorial on installing subversion, I got it running but when I tested it on the network, i got an error that is something like this :

    "Can’t connect to host "server": A connection attempt failed the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond."

    Thank you in advance for your help.

  174. arlene Says:

    regarding my own query,i got it already. the firewall is close for connection. after opening, i got connected.

    thanks for a wonderful tutorial on subversion.

  175. Ronald Widha Says:

    installing subversion server on windows

  176. Stijn Fonck Says:

    When service doesn’t want to start, try the following:

    svnservice -install "-d" "-r" "path_to_my_repos"

  177. David Says:

    Joe. I hear what you say about externals but how do you organise your projects when they ALL share a few common files?

    I like to have a project dir self-contained, containing all the files they need. In my current scm I can share files, which works well as it means I can work on old version of projectA, whilst simultaneously working on the tip version of projectB with each using a different version of (e.g)MyCode.cpp. It seems as though svn forces you to have:

    Project1

    Project2

    SharedCodeForAllprojects

    If a customer asks for a copy of the source for their project, it would involve sorting through SharedCodeForAllprojects extracting those files which are used in project1.

    This is my only resvervation about moving to svn.

  178. Joe White Says:

    I know that the book "Pragmatic Version Control Using Subversion" recommends some best practices on how to handle things like this. You might want to take a look at it.

    What our shop does is to have one big directory tree that contains all the files for all our projects. So we’ve got something like /allsource/trunk/project1, /allsource/trunk/project2, and /allsource/trunk/sharedstuff. The projects reference each other through relative paths. We check out the whole thing, and then maybe just work on one project. We also have a build script we can run locally, so that if we’re working on sharedstuff, we can easily build both project1 and project2 before we commit (so we don’t accidentally check in changes that break somebody else). If project1, project2, and sharedstuff are all being actively developed, then that might be the easiest thing to do.

    The Pragmatic book has some suggestions for making a /vendor directory, which is good for third-party code that has regular releases. I don’t remember the exact details (and I’m not sure we’re exactly following their recommendation), so I’ll refer you to the book for details on that.

  179. David Says:

    Thanks Joe. I purchased the pragmatic book last week as an ebook - I must get round to reading it =:-O

  180. TheCois Says:

    This made my day. Fantastic explanation. Got me up and running in no time.

  181. Nathan Says:

    Thanks for the great walk through. I am having the same problem as Jennifer and Floyd, which no one has really answered yet. I get "Section header expected" when I try to commit the change. It looks like something is wrong with my config file, but it looks fine to me:

    # [general]

    ### These options control access to the repository for unauthenticated

    ### and authenticated users. Valid values are "write", "read",

    ### and "none". The sample settings below are the defaults.

    anon-access = read

    auth-access = write

    ### The password-db option controls the location of the password

    ### database file. Unless you specify a path starting with a /,

    ### the file’s location is relative to the conf directory.

    ### Uncomment the line below to use the default password file.

    password-db = passwd

    ### The authz-db option controls the location of the authorization

    ### rules for path-based access control. Unless you specify a path

    ### starting with a /, the file’s location is relative to the conf

    ### directory. If you don’t specify an authz-db, no path-based access

    ### control is done.

    ### Uncomment the line below to use the default authorization file.

    # authz-db = authz

    ### This option specifies the authentication realm of the repository.

    ### If two repositories have the same authentication realm, they should

    ### have the same password database, and vice versa. The default realm

    ### is repository’s uuid.

    # realm = My First Repository

    can someone please help?

    Thanks!

  182. Nathan Says:

    Sorry.. I got it.. you have to actually uncomment out the "# [general] line as well. I misread the instructions. Duh!

    Thanks again!

  183. Yupeng Li Says:

    Nice job done! I thought SVN server on Windows is impossible…

    BTW, little suggestion:

    It will make the instruction-following even more effortless, if you can warn people not to leave any space before the configuration lines, and svnservice arguments may need to be manually added (at least in my attempt).

    Although there is this one-click installer, this step-by-step guide is still highly valuable for geeks like me who want a little peace of mind.

  184. Arash Says:

    I’ve spent so many hours on the Documentation and never got this far.

    You should write one for MySQL ;)

    Thanks a million

  185. Ilias Michalarias Says:

    Thanx indeed, really helpful guide

  186. Ahsan Shaikh Says:

    Thanks, good job.

    Here how I setup SVN to use it form cruisecontrol, ANT build, and Eclipse. It give me a solid development environment.

    // SYSTEM ENVIRONMENT VARIABLES

    ANT_HOME=D:\Java\apache-ant-1.6.5

    SVN_HOME=D:\Java\svn-win32-1.3.0

    JAVA_HOME=D:\Java\j2sdk1.4.2_10

    Path=%JAVA_HOME%\bin;%ANT_HOME%\bin;%SVN_HOME%\bin

    // SVN REPOSITORY

    D:\Java\svn\repository

    D:\Java\svn\repository\conf

    D:\Java\svn\repository\dav

    D:\Java\svn\repository\db

    D:\Java\svn\repository\hooks

    D:\Java\svn\repository\locks

    D:\Java\svn\repository\db\revprops

    D:\Java\svn\repository\db\revs

    D:\Java\svn\repository\db\transactions

    //SVN ANT TASK

    D:\Java\apache-ant-1.6.5\lib\jakarta-regexp-1.3.jar

    D:\Java\apache-ant-1.6.5\lib\svnant.jar

    D:\Java\apache-ant-1.6.5\lib\svnClientAdapter.jar

    D:\Java\apache-ant-1.6.5\lib\svnjavahl.jar

    D:\Java\apache-ant-1.6.5\lib\commons-lang-2.0.jar

    // SVN SERVICE

    D:\Java\svn-win32-1.3.0\bin\SVNService.ico

    D:\Java\svn-win32-1.3.0\bin\SVNService.exe

  187. Random Says:

    I was having problems with an "Error 203" message.

    Apparently SVNService doesnt take kindly to uninstalling and reinstalling to a different path and keeps the same path for the service in the registry.

    Just changed the path for the service in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SVNService section of the registry to the new one and it worked fine.

    Also, great guide. This saved me alot of time.

  188. benjamin Says:

    you saved me a complete day (-:, thanks

  189. M#R# Says:

    having:

    c:\Subversion

    c:\svn\repos

    and

    c:\Subversion\SVNService (with service wrapper inside : SVNService.exe)

    results in error 203. (env variables set correctly)

    —————

    Just move the svnservice.exe to subversion bin folder, (wrapper next to daemon to serve, rule of a thumb), and edit the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SVNService section to the correct path.

    voila ! service works

  190. Milan BARAN Blog Says:

    Instalace SubVersion

    http://excastle.com/blog/archive/2005/05/31/1048.aspx&nbsp;EN

    http://www.log-2.net/spot/instalace-subversion.aspx&nbsp;CZ...

  191. ?? Says:

    Mere-Moments Guide to installing a Subversion server on Windows

    ?windows???svn???, svn?????cvs???, ??gcc?????svn?????????

    ?windows???svn?????: 1???TortoiseSVN?????????, ???TortoiseSVN???:file:///drive:/path/to/????, ???????????, ????????bdb?? ??????????

    ??????subvision????, ????TortoiseSVN????, ???????????????

    ????????SVNService…

  192. Peter Says:

    Wow, why so many comments when the page is so good?-)…

    Ok, I installed fine, etc, but the problem I am having is that the svn client is reporting "authorization failed" on commits when I use svn://. I can do other commands. And if I change the anon access to be write instead of default read, then I can commit the change. Basically it seems that it is neither passing my username nor prompting for one (I thought it was supposed to do that). Even if I explicit use username and password params (or even just username) on the svn command line, there is no difference in behavior.

    Must be something silly… anybody?

  193. Peter Says:

    I had to uncomment the

    password-db = passwd

    line in svnserve.conf even though that is supposed to be the default, right?

    Good exercise… when troubleshooting, change related "defaults" to be explicit and different to see if error messages change.

  194. Mike Says:

    It is a perfect tutorial. And It works perfectly for me. It also save me a lot of time to read the whole document for just getting the subversion installed on windows.

    This article should be included in Subversion Team’s documentations or in their FAQ. The other information Subversion Team provided in their website is useful only after we can easily and successfully install it.

    Thanks for your excellent work indeed.

    By the way, I saw someone is using your article at his own blog without giving you credit. Here is this guy’s link:

    http://www.robgonda.com/blog/index.cfm/2005/7/7/Subversion-up-and-running-in-30-minutes-or-less

  195. Mike Says:

    It looks like that the person who is using your article finally gave you a credit and updated his blog late today by the advice from a person called Sam.

    Thanks, Sam.

    Thanks for your work again, Joe White.

  196. Mark Tutt Says:

    Excellent! After a couple of failed attempts to set up a Linux box just for the purposes of running Subversion, I googled a bit and found this. 30 minutes later it was up and running. Thanks!!

  197. VcD Says:

    You seriously rock! Thank you.

  198. swu Says:

    this step-by-step guide