Subversion
Installation
emerge -uva subversion
Configuration
Create your first repositories:
mkdir /var/svn svnadmin create /var/svn/cfengine svnadmin create /var/svn/documents svnadmin create /var/svn/scripts svnadmin create /var/svn/www
Okay, now you have a holding-tank for some types of documents you are likely to want to track.
Within each repository is a configuration file. You can have each repository configured separately with its own users and passwords, or you can make a universal password file for all repositories. You can have plain-text passwords, or you can use Subversion with SASL to permit encrypted passwords. Choose the one that best suits your needs.
Once you have decided, edit the conf/svnserve.conf configuration files in each repository. For example,
joe /var/svn/cfengine/conf/svnserve.conf
Within the configuration file you will want to set these lines:
[general] anon-access = none auth-access = write password-db = /var/svn/passwd realm = Cfengine Repository
If you want to permit anonymous read-only access and only require passwords for writing, then you can omit the anon-access and auth-access lines since this is the default.
The password-db line tells Subversion where to find the password file for this repository. If you want to have a common file for all repositories, just choose a common location and set this line the same in all repository svnserve.conf files.
The realm line is just a name for the repository. This shows up when you run svn –info.
Usage
Command-line
Check-out a repository, such as “cfengine”:
svn co svn://localhost/cfengine
Update a local copy of a repository with the latest files from Subversion:
svn up
Commit changes in the current directory (and any subdirectories) to the Subversion repository:
svn commit [filename(s)] -m "Comments that describe what I did in this revision."
Web browser
Instructions for installing and using ViewVC.
Windows' Web Folders
If you are forced to use a Windows box to access a Subversion repository, you can do so this way:
- Open Internet Explorer
- Choose File→Open
- In the dialogue box enter the http://whatever/ name of your server's repository
- Check the box to open it as a web folder