Subversion

Setting up a local Subversion server
This is a very quick guidance to get a local subversion server up and running on an eCS box. You can call it subversion server for dummies. There's a lot of in depth information available on the net about svn servers and you should consult these for more information. But if you want to have your local server up and running within 15 minutes, simply follow these steps:

At this time this is Subversion 1.6.4 - updated 2009-08-10. Read the readme and make sure you have libc063.dll installed which is the case with every modern eCS installation. You can add the \bin subdirectory to your PATH statement in config.sys, but this is not necessary. Add in your service file the following lines: svn          3690/tcp   # Subversion svn          3690/udp   # Subversion I'm not sure if this is really necessary but at least it's handy if you want to check your svn server with telnet (telnetpm localhost svn) Create a directory where the svn information for all your projects should end up. This should be on a data partitions. f.i. all my private data are on drive E:. This is also the drive where I make backups regularly. So I chose 'E:\svn\repos' as my svn base directory. Change all references below to your own directory.
 * Get the latest svn package from Paul's site and unpack it in a folder of your choice
 * Insert svn ports in x:\mptn\etc\service   (where x: is your boot drive)
 * Create a repository

Use svnadmin.exe from the \bin directory to create the repository. svnadmin create --fs-type fsfs e:\svn\repos creates various sub-directories below e:\svn\repos. Usually there's no need to edit the files here manually, you can use svnadmin instead. Some exceptions are stated below. Edit e:\svn\repos\conf\svnserve.conf and unmark the lines: anon-access = read auth-access = write password-db = passwd Edit the file e:\svn\repos\conf\passwd. In the user section add your users and passwords if required: [users] user1 = pwd anotheruser = Note user1 have to login with the password pwd, another user can login without password. Create a directory for a logfile if needed f.i. 'e:\Log\subversion\'
 * Allow users to connect to your svn server
 * 1) harry = harryssecret
 * 2) sally = sallyssecret
 * Start the server daemon

Start the server daemon with svnserve -d -r e:\svn\repos --foreground -T --log-file e:\Log\subversion\svnserv.log

From now on users can access projects created below 'e:\svn\repos'. A logfile called svnserv.log about svn transactions is written into directory e:\Log\subversion\.

Alternatively if you like to start the svn server every time your machine reboots you can create a reference from svnserve.exe to your startup folder with parameters -d -r e:\svn\repos --foreground -T --log-file e:\Log\subversion\svnserv.log and as working directory the \bin where you extracted your subversion files Caution - clean up your project tree before importing anything to the repository. Or better make a copy of your project directory and delete all files which are not really necessary for building your project. Especially all 'bin' files (like *exe, *obj, *dll) and all backup sub-directories. Files which are imported to the repository can not be deleted afterwards. Of course you can make another 'check in' and 'delete' unnecessary files so that they are ignored on later checkouts, but the repository have to keep the originally 'imported' files forever. That's the purpose of a svn/cvs server - to keep all older versions in the repository too. Of course you can add files afterwards so better import less than to much files at first.
 * Import your first project into the svn repository

svn import e:\_work\project1 file:///e:/svn/repos/eCS/test/project1/trunk -m "First Import"

Imports the whole tree below e:\_work\project1 into the repository which then can be accessed as  svn://localhost/eCS/test/project1  (change localhost to the computers ip-name or ip-address when accessing from other machines on your LAN). The 'check in' comment is set to 'First Import' in this example. Use forward slashes in the repository path as shown above

You can check your projects in your local repository with svnlook tree e:\svn\repos Use your favourite svn client to access your repository. I suggest SmartSVN 6.0.7. I've used 2.1.3 successfully in the past too. 6.0.4 and 6.0.5 have nasty problems on eCS. If you want to access your repository from Windows machines,  tortoise  maybe a good choice.
 * Access your repository

Point the repository browser to  svn://loacalhost/  to browse your projects.

Most of the steps above including creating the repository can be handled from the SmartSVN GUI too. Repository - Set Up Local Repository.. let you create your repository and users in a GUI fashion. If you create a User within SmartSVN without a password SmartSVN inserts null as password. But you can correct this by manually editing 'e:\svn\repos\conf\passwd' of course.

Links

 * Subversion ported by Paul Smedley
 * Subversion ported by Brian Havard
 * SmartSVN Java subversion client