SVN Quick Reference

Having followed these instructions to set up Subversion I thought I would keep a note of frequently used commands. Recommended Reading – http://svnbook.red-bean.com/en/1.7/index.html

Creating a new repository

Login to your Synology Box and:

sudo su svnowner
cd /volume1/svn/
svnadmin create nameOfRepository

Under /volume1/svn/test/conf edit the passwd file to have following contents:

[users] 
testuser = testpw

Also chmod 600 passwd to limit chances of it being read.  Edit also the svnserve.conf to have following contents:

[general] 
anon-access = none 
auth-access = write 
password-db = passwd 
realm = I am your test repository

Checking out a repository

svn co svn://server/directory localFolder

Adding a file

From inside a repository i.e.  you must cd into the local repository folder

svn add test.txt

or for all files use

svn add *

and for files added since the first commit

svn add --force * --auto-props --parents --depth infinity -q

Committing Files

svn ci -m "Commit test"

Updating local repository with remote version

Use svn update to bring your working copy into sync with the latest revision in the repository:

svn update

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.