Subversion

Repository for Subversion over SSH Disappeared after Subversion Upgrade

This might happen for svn over ssh. After the subversion upgrade, we started to get

svn: No repository found in 'svn+ssh://...'

To fix this, go to the svn server, and do the following:

# cd /usr/bin
# ls -l svn*

If you don't see the soft link of svnserve linking to your customized "svnwrapper.sh" (or whatever file name you call it), then do this:

# mv svnserve svnserve-daemon
# ln -s /usr/local/bin/svnwrapper.sh svnserve

This should fix it.

Install and Configure Subversion over SSH on CentOS

Server setup

  1. Install subversion
    root# yum install subversion
  2. Create a Repository. This is where all your files will be stored. You can put this anywhere, such as /var/subversion/repos/mycodes
    root# svnadmin create /var/subversion/repos/mycodes
    root# cd /var/subversion/repos/mycodes/conf
    root# vi svnserve.conf

    Now add the following into the file svnserve.conf:
    anon-access = none

Set Subversion Properties

This page explains how to set svn props: http://svnbook.red-bean.com/en/1.1/ch07s02.html

  • To set the $Id$ property, we do
    $ svn propset svn:keywords "Id" filename
  • To set executable on a file, we do
    $ svn propset svn:executable on filename

svn: This client is too old to work with working copy

Once in a while, I ran into this error with subversion:

svn: This client is too old to work with working copy ...

There are a couple of senarios:

1. The subversion is indeed too old, then we just upgrade it.

2. We temporarily tried a newer version of subversion. And the trial upgraded the format of the svn metadata.

3. We copied (rsync) the entire directory from another server that has a higher subversion.

Checking Rails Project into Subversion

The book "Rails Cookbook" has a wonderful section on "Getting Your Rails Project into Subversion".

In short, here are the steps:

Create Soft Link in Subversion

Subversion supports symbolic link, as stated in http://subversion.tigris.org/. Here is the quote:  

  • Versioning of symbolic links

    Unix users can place symbolic links under version control. The links are recreated in Unix working copies, but not in win32 working copies.

  • it's simple to test this. In a directory where you have svn code checked out, do

    % ln -s file file_link
    % svn add file_link
    % svn ci