How to Setup Subversion

From ReduxWiki

Jump to: navigation, search

Contents

[edit] (maybe) request svn installation on your server

If you can't find the svn binary (often /usr/bin/svn) on your server you may have submit request to support to have it installed.

[edit] Create your new repository

Start by sshing into your account.

mkdir svn
cd svn
svnadmin create railsapp

[edit] Setup your initial directory structure

mkdir ~/tmp/railsapp
cd ~/tmp/railsapp
mkdir branches
mkdir tags
mkdir trunk


[edit] Setup your blank Rails project (optional)

cd trunk
rails .

[edit] Import your new project

svn import ~/tmp/railsapp file:///home/userid/svn/railsapp
-m "initial import"
Clean up
rm –r –f ~/tmp/railsapp


[edit] Checking out on your host

svn co file:///home/userid/svn/railsapp/trunk railsapp


[edit] Working with RadRails (radrails.org)

Setup your location.

  • 1. Click on Window, then select preferences
  • 2. Click on Team, then SVN
  • 3. Now change the SVN Interface to JavaSVN, then click ok
  • 4. Click on Window, open perspective, then other.
  • 5. Next, select SVN Repository Exploring
  • 6. Click on the icon that says SVN+
  • 7. For the url put: svn+ssh://yourdomain.com/home/userid/svn/railsapp/trunk
  • 8. The root url should be svn+ssh://yourdomain.com/home/userid/svn/railsapp
  • 9. Now type in your ssh user id and password, click finished, you may be asked for your password again.


[edit] Checkout the project

  • Right click on your location and select checkout as project.


[edit] Common commands

  • svn diff - to see unified diff output of your changes.
  • svn commit - to commit the new version of your file to the repository.
  • svn update - to bring your working copy “up-to-date” with the repository.


[edit] Additional Resources




Image:Tip.png Back to How To Documents
Personal tools
Getting Started