howto set up local svn repository

Objective

Set up a local svn repository to store some code

Install subversion

yum install subversion

Repository Setup

We will set up a path to store the repositories then create the initial repository

mkdir -p /usr/local/svn
svnadmin create /usr/local/svn/repo1

Initial Import of content to the repository

Linux/Unix

svn import /path/to/files/to_checkin file:///usr/local/svn/repo1/trunk -m "first Import"

Windows

svn import project file:///d:/repository_name/project -m "First Import"

Network

svn import project http://host_name/svn_dir/repository_name/project -m "First Import"

Accessing your svn repository remotely

If you aren’t using apache you’ll need to use svn + ssh

On remote machine

1. Set up passwordless ssh access to your hosts server
2. Create some local aliases to make everything easier

SVN_LOCALPATH="/path/to/local/copy/of/repo"
SVNROOT="svn+ssh://[email protected]/usr/local/svn/"
export SVN_LOCALPATH
export SVNROOT

3. Perform the checkout

svn co $SVNROOT/repo1 $SVN_LOCALPATH

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>