Keys to getting SVN to work

First set the following in '.bashrc'
SVN_EDITOR=/usr/bin/nano
export SVN_EDITOR
this allows sets the default svn editor to 'nano' or you can set it to the editor of your choice.

Okay, say I want to set up a repository and actually edit code in the following directory
~/path/to/code
I first need to create an svn repository which can be done by executing the following
svnadmin create ~/path/to/repository
Then I move to the directory that contains the folder of code ('importfolder') I want to initially import and execute the following
svn import importfolder file:///full/path/to/repository -m "Initial import"
This import can be checked by running
svn list file:///full/path/to/repository
I can now move to any directory where I want to check out the repository and execute the following
svn co file:///full/path/to/repository

If I want to allow remote access to the repository find the following file
~/path/to/repository/conf/svnserve.conf
and include the following commands
[general]
anon-access = none
auth-access = write
user=password
where none and write can be either (none, read or write) I think and the list the users and passwords that have authorized access.
These files can no be checked out remotely on any machine by numerous methods, but here I list the way to use svn+ssh by executing the following command on the remote computer in the location where you want the respository checked out
svn co --username user --password password svn+ssh://hostname.host/full/path/to/repository
This should all be pretty close to correct, but I'm typing up something I wrote a while ago and haven't checked all these commands recently.

No comments: