make sure SVN suits your purpose
http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Subversion/index.html
how to setup svn server on ubuntu hardy haron, 20080731
from
start SVN setup
<user>@ubuntuvb:/$ sudo apt-get install openssh-server
<user>@ubuntuvb:~$ sudo apt-get install apache2
<user>@ubuntuvb:~$ sudo apt-get install subversion
<user>@ubuntuvb:~$ sudo groupadd subversion
<user>@ubuntuvb:~$ sudo usermod -a -G subversion <user>
<user>@ubuntuvb:~$ sudo usermod -a -G subversion www-data
<user>@ubuntuvb:~$ sudo mkdir /home/svn
<user>@ubuntuvb:~$ cd /home/svn/
<user>@ubuntuvb:/home/svn$ sudo mkdir reponame1
<user>@ubuntuvb:/home/svn$ sudo svnadmin create /home/svn/reponame1/
<user>@ubuntuvb:/home/svn$ sudo chown -R www-data reponame1/
<user>@ubuntuvb:/home/svn$ sudo chgrp -R subversion reponame1/
<user>@ubuntuvb:/home/svn$ sudo chmod -R g+rws reponame1/
<user>@ubuntuvb:/home/svn$ sudo apt-get install libapache2-svn
<user>@ubuntuvb:/home/svn$ cd /etc/apache2/mods-available/
<user>@ubuntuvb:/etc/apache2/mods-available$ sudo vi dav_svn.conf
<Location /svn>
## Uncomment this to enable the repository
DAV svn
##use SVNParentPath if you have multiple repositories under
## under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
## You need either SVNPath and SVNParentPath, but not both.
SVNParentPath /home/svn/
# Basic Authentication is repository-wide. It is not secure unless
# you are using https. See the 'htpasswd' command to create and
# manage the password file - and the documentation for the
# 'auth_basic' and 'authn_file' modules, which you will need for this
# (enable them with 'a2enmod').
AuthType Basic
AuthName "research group subversion repository"
AuthUserFile /etc/subversion/passwd
# To enable authorization via mod_authz_svn
#AuthzSVNAccessFile /etc/apache2/dav_svn.authz
#other option, to allow anonymous web browsing:
####<LimitExcept GET PROPFIND OPTIONS REPORT>
# NEW: require auth for everything except reports
<LimitExcept REPORT>
Require valid-user
</LimitExcept>
</Location>
<user>@ubuntuvb:/etc/apache2/mods-available$ cd /
<user>@ubuntuvb:/$ sudo vi /etc/apache2/conf.d/fqdn
ServerName localhost
<user>@ubuntuvb:/$ sudo /etc/init.d/apache2 restart
<user>@ubuntuvb:/$ sudo htpasswd -c /etc/subversion/passwd username1A242
New password:
Re-type new password:
Adding password for user username1A242
<user>@ubuntuvb:/$ sudo htpasswd /etc/subversion/passwd username2B42
New password:
Re-type new password:
Adding password for user username2B42
done with SVN setup and two users
adding another user
<user>@ubuntuvb:/$ sudo htpasswd /etc/subversion/passwd username352
New password:
Re-type new password:
Adding password for user username352
Authentication:
second repository setup
<user>@ubuntuvb:/home/svn$ sudo mkdir reponame2
<user>@ubuntuvb:/home/svn$ sudo svnadmin create /home/svn/reponame2/
<user>@ubuntuvb:/home/svn$ sudo chown -R www-data reponame2/
<user>@ubuntuvb:/home/svn$ sudo chgrp -R subversion reponame2/
<user>@ubuntuvb:/home/svn$ sudo chmod -R g+rws reponame2/
moving an existing repo to a new box
see
on the old box,
<user>@ubuntuvb:/$ sudo svnadmin dump /home/svn/reponame/ > /home/name/ubuntuvb_reponame.dump
<user>@ubuntuvb:/$ sudo tar zcf reponame.tgz reponame.dump
<user>@ubuntuvb:/$ sudo scp reponame.tgz newhost:/home/svn/reponame
cd /home/svn/reponame
svnadmin create reponame
tar zxf reponame.tgz
svnadmin load reponame < reponame.dump
restructuring existing repositories
see last paragraph of
create the main directory that users will connect to
$ sudo svnadmin create /path/to/mainrepo
make the subdirectories as desired, pasting this entire chunk into one command line prompt in this format
$ sudo svn mkdir -m "Initial project roots" \
file:///path/to/mainrepo/subrepodir1 \
file:///path/to/mainrepo/subrepodir2 \
file:///path/to/mainrepo/subrepodir1\subsubrepodir \
put the previously created dump files in the appropriate subdirectories
$ sudo svnadmin load /path/to/mainrepo --parent-dir subrepodir1 < orig1.dump
$ sudo svnadmin load /path/to/mainrepo --parent-dir subrepodir2 < orig2.dump
$ sudo svnadmin load /path/to/mainrepo --parent-dir subrepodir1\subsubrepodir < orig1sub1.dump
to dump only a range of revisions,
$ sudo svnadmin dump reponame -r 34:98 > repo_34to98.dump
misc
To access from CLI,
svn co http://localhost/svn/quasi1d quasi1d --username <username>
svn checkout svn+ssh://svn.example.com/home/svn/projectrepo/trunk localdir
svn update
svn commit
what is the server URL?
svn info
What is the SVN version of each PDF in this folder?
svn list --verbose *.pdf
To get a list of all the historical data,
svn log --verbose >> svn.log
32bit:
directions for Tortoise on Windows:
install tortoise
create a directory
VPN in order to be able to access http://serverIP
in the "right click" menu, select "SVN update"
When you commit, you will be prompted for authentication.
IMPORTANT: "SVN Update" pulls down the current version from the server, whereas "SVN Commit" makes your changes the current version. If you make changes to the local copy and then say "SVN Update" all your changes will be permanently lost (not recoverable).
in Ubuntu you can use command line "svn" or use
$ sudo apt-get install rapidsvn
[I haven't tried rapidsvn, it's the only one I know about. there are others]
there's an ebook on SVN if you're bored:
Other viewers:
for when you don't have access to the "svnadmin" command on the server
(from http://stackoverflow.com/questions/49450/how-do-i-export-and-then-import-a-subversion-repo)
1. Install missing dependencies ("APR" and Subversion libs)
sudo apt-get install apache2-threaded-dev
sudo apt-get install libsvn-dev
2. Install rsvndump
wget http://prdownloads.sourceforge.net/rsvndump/rsvndump-0.5.5.tar.gz
tar xvfz rsvndump-0.6.tar.gz
cd rsvndump-0.6
./configure
make
sudo make install
3. Dump the remote SVN repository to a local file
rsvndump http://my.svnrepository.com/svn/old_repo > old_repo_dump
4. Create a new repository and load in the local dump file
sudo svnadmin create /opt/subversion/my_new_rep
sudo svnadmin load --force-uuid /opt/subversion/my_new_repo < old_repo_dump
Note: if the above steps don't work, here's how to install from source
sudo apt-get install libsvn-dev
wget http://mirrors.axint.net/apache/apr/apr-1.4.6.tar.gz
tar -xvzf apr-1.4.6.tar.gz
cd apr-1.4.6/
./configure
make
sudo make install
cd ..
wget http://iweb.dl.sourceforge.net/project/rsvndump/rsvndump/rsvndump-0.6/rsvndump-0.6.tar.gz
cd rsvndump-0.6/
./configure --with-apr-util=/usr/local/apr/bin/apu-1-config
make
sudo make install
rsvndump http://my.svnrepository.com/svn/old_repo > old_repo_dump
$ svnadmin dump /home/svn/reponame/ > /home/$USERNAME/reponame.dump
$ tar zcf reponame.dump.tgz reponame.dump