After reading several good things regarding Subversion and TortoiseSVN I decided to give it a try. The “final straw” came while looking into Ajax.NET which is housed in SVN and required installing TortoiseSVN to obtain the source. The process was so smooth and easy I decided it was worth a shot. The scm options facing my little company are very typical:
- Continue using VSS with it's warts - extremely slow client, requires either VPN access to servers in office or a 3rd party product such as SourceOffsite to make remote access feasible, etc.
- Purchase another solution such as Vault.
- Migrate to Team Foundation Server - not only is the new pricing model a “step-up“ for small ISVs but there's hidden costs as well. It requires 3-tier deployment, must install/use Active Directory, requires SQL Server 2005. Can I really afford to update memory, buy licenses, and dedicate at least three servers for what used to take just one?
- Try something else such as Subversion.
I decided to try door #4. Below is a quick “cookbook” style approach of what it took to get it up and running. Following that are a variety of links that I found.
- Install Apache 2 (2.0.54):
- Change httpd.conf to use non-default port (Listen 81 or Listen 8080).
- Create Windows user account ApacheUser.
- Grant ApacheUser modify rights to C:\Program Files\Apache Group\Apache2\logs
- Change Apache service to run as ApacheUser and restart.
- Install Subversion (1.2.1):
- Run Subversion installer.
- Modify httpd.conf to add /svn virtual root (see TortoiseSVN docs - 3.1.4)
- Create svn root directory somewhere (e.g. F:\svn). Note the multiple warnings that you should NOT use the Berkley DB repository format for network shares (including UNC names, mapped drives, etc.).
- Grant ApacheUser full control rights to svn root directory (e.g. F:\svn).
- Create Apache passwd file and add users (can optionally configure for SSPI to Windows domain - see TortoiseSVN docs).
- bin\htpasswd -c passwd
- bin\htpasswd passwd
- Restart Apache and test (http://localhost:81/svn/repos)
- Install TortoiseSVN (1.2.2.4299 VS.NET - ASP.NET version) which is an excellent Windows shell extension for using SVN.
- Re-boot to get shell extension icons working.
- Right-click on repository (e.g. F:\svn\repos) and Create Repository...
- Install AnkhSVN (0.5.5.1653) for VS.NET integration.
Edit \Application Data\AnkhSVN\ankhsvn.xml - uncomment
<AdminDirectoryName>_svn</AdminDirectoryName>
to match TortoiseSVN patch for ASP.NET files. - Final note for properly backing up the repository:
svnadmin hotcopy path/to/repository path/to/backup --clean-logs
Here's a list of links I found very helpful in addition to both the Subversion documentation and especially the TortoiseSVN documents (since it is a Windows client).
Cory Foy, Getting Subversion running with .NET
Michael Flanakin, Subversion and Windows Authentication with Subversion on Windows
Jonathan Malek, NAnt, Subversion and VS.NET
Fritz Onion, ASP.NET Application without Web Projects ** It seems a lot of folks like this one however I did not take this route - instead I used the “patched” version of TortoiseSVN which uses “_svn” instead of “.svn” for local admin directories.
One interesting piece of information I found was buried in the replies of this post. Specifically, “The important thing to note is: The initial copy you used to import is not a checked out copy. It cannot be used to work with subversion. You need to check out your own copy. (Even though you already have all the files)”.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.