Setting Up a Local Subversion Server: Difference between revisions
No edit summary |
m Ak120 moved page Subversion to Setting Up a Local Subversion Server |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | == 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: | |||
* '''Get the latest svn package from Paul's site and unpack it in a folder of your choice''' | |||
* '''Get the latest svn package from | |||
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. | 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. | ||
* '''Insert svn ports in ''x:\mptn\etc\service'' ''' (where x: is your boot drive) | * '''Insert svn ports in ''x:\mptn\etc\service'' ''' (where x: is your boot drive) | ||
Add in your service file the following lines | Add in your service file the following lines: | ||
svn 3690/tcp # Subversion | svn 3690/tcp # Subversion | ||
svn 3690/udp # 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'') | 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 repository''' | * '''Create a repository''' | ||
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 | 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. | ||
creates various | Use svnadmin.exe from the \bin directory to create the repository. | ||
svnadmin create --fs-type fsfs e:\svn\repos | |||
creates various subdirectories 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. | |||
* '''Allow users to connect to your svn server''' | * '''Allow users to connect to your svn server''' | ||
Edit e:\svn\repos\conf\svnserve.conf and unmark the lines | Edit e:\svn\repos\conf\svnserve.conf and unmark the lines: | ||
anon-access = read | anon-access = read | ||
auth-access = write | auth-access = write | ||
password-db = passwd | password-db = passwd | ||
Edit the file e:\svn\repos\conf\passwd. In the user section add your users and passwords if required | Edit the file e:\svn\repos\conf\passwd. In the user section add your users and passwords if required: | ||
[users] | [users] | ||
# harry = harryssecret | # harry = harryssecret | ||
Line 35: | Line 26: | ||
user1 = pwd | user1 = pwd | ||
anotheruser = | anotheruser = | ||
Note user1 have to login with the password ''pwd'', | Note user1 have to login with the password ''pwd'', another user can login without password. | ||
* '''Start the server daemon''' | * '''Start the server daemon''' | ||
Create a directory for a logfile if needed f.i. 'e:\Log\subversion\' | Create a directory for a logfile if needed f.i. 'e:\Log\subversion\' | ||
Start the server daemon with | 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\. | 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 | |||
* '''Import your first project into the svn repository''' | * '''Import your first project into the svn repository''' | ||
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 | 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 subdirectories. 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 has 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 too many files at first. | ||
'''svn import e:\_work\project1 file:///e:/svn/repos/eCS/test/project1/trunk -m "First Import"''' | '''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 | Imports the whole tree below e:\_work\project1 into the repository which then can be accessed as <tt><nowiki>svn://localhost/eCS/test/project1</nowiki></tt> (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''' | You can check your projects in your local repository with '''svnlook tree e:\svn\repos''' | ||
* '''Access your repository''' | * '''Access your repository''' | ||
Use your | 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. | ||
Point the repository browser to | Point the repository browser to <tt><nowiki>svn://loacalhost/</nowiki></tt> 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. | 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 == | |||
* [http://os2ports.smedley.id.au/index.php?page=subversion Subversion] ported by Paul Smedley | |||
* [http://silk.apana.org.au/subversion Subversion] ported by Brian Havard | |||
* [http://www.smartsvn.com SmartSVN] Java subversion client | |||
[[Category:Tools Articles]] |
Latest revision as of 19:46, 7 August 2023
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:
- Get the latest svn package from Paul's site and unpack it in a folder of your choice
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.
- Insert svn ports in x:\mptn\etc\service (where x: is your boot drive)
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 repository
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.
Use svnadmin.exe from the \bin directory to create the repository.
svnadmin create --fs-type fsfs e:\svn\repos
creates various subdirectories 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.
- Allow users to connect to your svn server
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] # harry = harryssecret # sally = sallyssecret user1 = pwd anotheruser =
Note user1 have to login with the password pwd, another user can login without password.
- Start the server daemon
Create a directory for a logfile if needed f.i. 'e:\Log\subversion\'
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
- Import your first project into the svn repository
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 subdirectories. 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 has 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 too many files at first.
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
- Access your repository
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.
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