By far the smoothest (notice I don't use "best") SCM client interface I have come across has to be
TortoiseSVN. Its seamless integration into the Windows Explorer shell make it an ease to work with.
Of course, no wonderful client alone is gonna do much good unless it has a repository server to work with.
Subversion, the SCM system that TortoiseSVN checks against, is an adaptive software with different modes of deployment. Here I will focus on how get Windows 2003 to run its own proprietary service
svnserve.exe as a true-blue Windows Service.
True to its Unix roots, Subversion administration is handled by an array of command line tools. While its implementation for Windows is pretty decent, svnserve.exe is not installed as a Windows Service (again remaining true to Unix, which easily runs command line programs in background). So after setting up a repository, for example
svnadmin.exe create F:\Repo\First --fs-type fsfsOne still has to activate the service in an interactive desktop session
svnserve.exe -d -r F:\Repowhich will leave a
blank console prompt window hanging perpetually until one decides to close it or
logout. Not a good deal for [smart] administrators who don't like logging on to perform manual tasks.
The good news for Windows 2003 administrators is the
Server Resource Kit is available for download, packing some very useful programs that will grant +1 to 5 power-up in administration capabilities. Can be worn on any finger. But require at least Level 20 experience due to the usual Microsoft support policy (or lack thereof) and frequent recommendations to visit the dungeon known as the Registry. This exercise will bring you there as well, so
stock up on health potions backup your system.
Critical to this issue are two tools:
instsrv.exe and
srvany.exe. The former is used to register any executable as a Windows Service. Once that is done it will appear in the Services MMC. So registration syntax follows the likes of
instsrv.exe SubversionRepository "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
That's right, you saw it correctly, no mistake - the latter tool is being registered as the executable for the service named SubversionRepository (you can call it something else if you want). Srvany.exe is a
wrapper executable, providing the necessary behaviour required of a real Windows Service program, which the actual intended program may not. In this case, svnserve.exe. So how does srvany.exe know
what to wrap and run in the first place? Time to put on your armour, cast the buffs, and launch
regedit.exe.
- Navigate down to HKLM\SYSTEM\CurrentControlSet\Services\SubversionRepository, which is what instsrv.exe wrote into the Registry, but only with the bare essentials.
- Under this key, create a new sub-key called "Parameters". Do so by right-clicking and selecting New > Key from the context menu.
- Within this sub-key two new string values have to be placed, so again right-click and New > String Value twice.
- Rename the first one "Application" and modify its value to "C:\Program Files\Subversion\bin\svnserve.exe" (without quotes).
- Rename the second to "AppParameters" and modify its value to "-d -r F:\Repo" (without quotes).
Additionally, you may opt to be more security-minded and make use of NT AUTHORITY\NETWORK SERVICE to run the service. Which case, remember to grant NETWORK SERVICE Modify permissions to the repository root directory and Read permissions to the Subversion installation.
Once the Registry is modified, the service can be started and you should well be on the way to accessing the Subersion repository via its proprietary protocol svn://machine/First/,
without you having to logon.