Install a local Subversion server on your windows machine

Share

I need to test some of Subversion’s functionality without our server admins hating me at work so I decided to build me a local server based on this  post by Jeff Atwood, I installed the server with the Apache 2.o bindings from SVN’s website. So after getting the binaries in my computer’s hard disk this is how it went:

  • I first listed the create command help page to check out options and parameters:
    svn_create_command_help
  • It was hard to believe how easy it is to create a repository:
    svn_create_command
  • This is the directory structure in the new repository
    svn_create_command_2
  • This is how the conf directory looks on the inside:
    04_svn_create_command_3
  • This is how the password file looks like out of the box:
    svn_create_command_4
  • I followed instructions to the line when editing the svnserve.conf file:
    svn_create_command_5
  • I love the sc command, it is usually way more flexible than “net”, when doing “sc create” to create a windows service always remember to separate each parameter’s value from the equals simbol with a space or otherwise the command won’t work:
    svn_run_as_service
  • Set the SVN_EDITOR variable to Notepad’s path:
    svn_run_as_service_2
  • Now that your SVN service is started you are ready to create the folder structure in your brand new repository, make sure that you use the SVN protocol as the first component of your project URL, I was using http:// and file:// and getting nowhere until I realized the correct protocol is SVN://
    svn_mkdir_error
  • You can use the –parents modifier of the mkdir command to save some keystrokes by creating a full directory path at once:
    svn mkdir --parents
  • I downloaded and installed TortoiseSVN a very nice SVN client that works as a windows shell extension, by right-clicking on any windows explorer window I get access to the menu shown below:
    tortoiseSVN_repository_browse
  • After clicking Repo-browser and entering svn://localhost I can browse the folder structure I just created in my repository in a nice graphical format:
    tortoisesvn_repo-browse

For any inquiries on this topic please post to the General Discussion or Best Practices threads on the THE Business Intelligence Forum, our better alternative to sites that make you pay to look at answers like dsxchange or that disallow references to any of their competitors like ITToolbox…

Tags: ,

Leave a Comment