Subversion path differences for svn and svn+ssh
As womble have said, indeed this is the 'feature' of svn over ssh.
I had svn+ssh working without specifying the full path to repositories because the svn server had a svnserve wrapper script in place of original svnserve binary. Later, during subversion update this script was overwritten by the original binary.
Solution:
-
Rename svnserve to bin
mv /usr/bin/svnserve /usr/bin/svnserve.bin
-
Save this script as /usr/bin/svnserve:
#!/bin/sh exec /usr/bin/svnserve.bin -r /srv/svn "$@"
-
Update permissions
chmod 755 /usr/bin/svnserve
That's because svn over SSH (svn+ssh://
) is just accessing a subversion repository "locally", using SSH as the transport, and hence you have access to the entire filesystem. Svnserve, in contrast, is told "start your paths with /srv/svn
, and so you don't have to specify it manually.
You can edit the ssh login command for users using svn+ssh, by editing the ~/.ssh/authorized_keys of the subversion user. The line for a user will looks like :
command="/usr/bin/svnserve -r /srv/svn [other svnserve options]" <key type> <user key> <key comment>
There are more svn+ssh tricks in the svn book