Setting up a SVN server on Windows and other instructions



software > subversion

This page will show you how to backup and restore a svn repository as well as install a new SVN server on your windows machine.



How edit revision messages in TortoiseSVN
Download and put pre-revprop-change.bat in svnroot\hooks

How to make backups and use them
$ cd c:\directory\receiving\backup
$ svnadmin dump c:\svnroot > svnbackup.golem.11sep2005.svn
$ svnadmin load c:\svnroot < svnbackup.golem.11sep2005.svn

$ cd c:\directory\receiving\backup
$ svnadmin dump c:\svnroot --revision 0:1000 > svnbackup.golem.11sep2005.0to1000.svn
$ svnadmin dump c:\svnroot --revision 1001:2000 --incremental > svnbackup.golem.11sep2005.1001to2000.svn
$ svnadmin load c:\svnroot < svnbackup.golem.11sep2005.0to1000.svn
$ svnadmin load c:\svnroot < svnbackup.golem.11sep2005.1001to2000.svn

How to install Subversion on windows as a service (my notes)
(i) Install TortoiseSVN (recommended: 1.5.9)
TortoiseSVN default editor :
SVN_EDITOR (environment variable)
C:\Program Files\EditPadPro5\EditPadPro.exe

(ii) Install subversion. (like Setup-Subversion-1.5.6.msi or svn-1.4.6-setup.exe). Get a version in sync with TortoiseSVN, for example if you get 1.4.X TortoiseSVN, get 1.4.X subversion server.
I strongly recommend you take the latest stable version of a series (and thus not the latest version).
(iii) Extract SVNService.exe into C:\Program Files\subversion\bin
(iv) Create a folder : D:\svnroot
(v) in cmd.exe type
> svnadmin create --fs-type fsfs D:\svnroot
(Also, if your TortoiseSVN version is in sync with subversion (both are 1.5.X for example) you can go into that folder in Explorer and right-click : TortoiseSVN | Create a new repository here
(vi) Edit d:\svnroot\conf\svnserve.conf
uncomment in [general] these three lines: anon-access = read, auth-access = write, password-db = passwd
(vii) Edit d:\svnroot\conf\passwd
Put your usernames/passwords in there.
(viii) in cmd.exe type
> cd "C:\Program Files\subversion\bin"
> svnservice -install --daemon --root d:\svnroot
(ix) Edit the service to always start (Control Panel | Administrative Tools | Services)
Right-click on SVNService, Properties, Startup Type = Automatic. Then reboot or start the service manually.

Note: If you don't use svnadmin to create the repository, you might have a error about the db format version when accessing your new repository.


Resolve Bug: Cannot see the latest svn commits in "Show Log" dialog.
I've seen this bug with TortoiseSVN 1.6.3, Build 16613
In the show log, it doesn't display the commits after a certain date, even if you click Show All.

Solution:

Turn off cache logs (which is turned on by default).
Right-click in explorer, go in TortoiseSVN | Settings
In the dialog, choose the section "Log Caching"
Uncheck "Enable log caching", click Apply


(vii) in cmd.exe type
> cd "C:\Program Files\subversion\bin"
> svnservice -install --daemon --root d:\svnroot