Harry Seldon's blog

Fractals, Chaos, and Control Systems on Rails


A quick SVN tutorial

Posted by Harry Seldon on August 06, 2008

Here is a quick tuto to setup a repository with svn on an online host assuming a ssh connexion. We will use the command line as you will probably need to use it to work on your remote server.

Your local source code is in /home/localaccount/myapp

Your remote space is on /home/remoteaccount/www/

Let’s create the repository directory on your remote account :

cd /home/remoteaccount/www
mkdir svn
cd svn
mkdir myapp

Now, we tell svn to make this directory a repository:

svnadmin create –fs-type fsfs ./myapp

As a good practice, we will create the usual branches, tags, and trunk subdirectories in the repository.
First we create a directory structure :

cd /home/remoteaccount/www/
mkdir structure
cd structure
mkdir branches tags trunk

Now we import the structure:

svn import /home/remoteaccount/www/structure/. file:///home/remoteaccount/www/svn/myapp –message ‘Initial repository layout’

Finally we import the source code:
Run this command on our local account:

cd /home/localaccount/
svn import /home/localaccount/myapp/. svn+ssh://remoteaccount@ssh.mydomain.com/home/remoteaccount/www/svn/myapp/trunk –message "initial import"

(do not forget the /trunk/) If you have a ssh properly setup with rsa key you won’t have to type any password.

I find this tuto quite hostile but my point is to use the command line. In general, I use a GUI (subclipse) but the only case where I have to actually type svn commands is when I setup a repo on my remote server. Maybe you are in the same case !

Posted in | no comments | Tags , | atom



Use the following link to trackback from your own site:


Leave a response

Leave a comment

Markdown enabled



Recent Comments

Recent Posts


actuators aircraft atc blog chaos chaos_theory charts control controllers controls crisis economy finance flight fractals git gnc gs guidance linux mandelbrot marketing navigation ns ofc on pilot rails ruby sas scs sensors statistics systems techcrunch thinkosphere tutorial typo ubuntu wifi