Category Archives: Subversion

Subversion and commands

This subversion tutorial describes the common subversion commands to maintain your repository.Subversion tutorial and commands

Setup a new repository on your diskstation (see this article for instructions to install Subversion onto your DiskStation):

  1. Goto your DiskStation box with the SVN server and create the repository:
    /opt/bin/svnadmin create myrepo
  2. Edit the passwd file in /volume1/svn/myrepo/conf/passwd; add a line below [users]:
  3. Edit the svnserve.conf and add the line
  4. Uncomment the line

Now to add an existing folder to this new repository execute the command below:
svn import localdir svn://diskstation.local/myrepo

The local directory localdir is now under source control. Add some files to the local directory and execute the status command:

The files you just added are shown starting with a question mark. You can add the new files to your repository with the add command:

The file is now added to source control but it is not committed yet; lets do that now with the command commit command:

Your default (terminal) editor will open and you are allowed to type a comment for this new revision; go ahead and type your comment (or leave it empty). After you type your comment press Ctrl-X; if you typed a comment pres Y and press enter; otherwise press c.

Subversion responds with the message below; your newfile is added:

Delete a file from your repository with the delete command:

Commit the delete action with the commit command:

If you ever run into the warning message “Directory ‘current/dir’ is out of date update local files” you have to update your local copy of the repository; execute the command below:

Add all new files to the SVN repo:


Create SVN repository on Synology

Howto install SVN on your Synology:

Telnet to your NAS
Repositories has to be owned by svnowner; be sure to execute creation of the repository as svnowner (or chown afterwards):

On the synolyg your harddisk is mounten at /volume1; create a directory “svn” here:

Now create your SVN repository with the svnadmin command (on the synology the svn command is not on the path but can be found at /opt/bin):

If you want to delete a repository you can do this with regular unix commands; there is no “internal” SVN registration.

Now you have to setup the access to this new repository. Change directory to your new repository conf folder:
cd /volume1/svn/test/conf

The svnadmin command has stored some default files here; passwd and svnserve.conf. First edit the passwd file to add your users for this repository. Below the [users] text add your users.

Now edit the svnserve.conf in the same folder. Disable anonymous access to your repository by adding: anon-access = none

To use the password file for authentication of your users you have to uncomment the password-db = passwd line.

That’s all you have to do on your synology. SVN is setup (see link) and the repository is created with appropriate user access..

Now go to your client machine and checkout the new repository:

Check the status of your local repository copy:

Add a file to your repository

And commit the file to the repository