Archive for the 'subversion' Category

Jan 31 2009

Eclipse and SVN

Published by under subversion

If you like to know how to use SVN from Eclipse  refer to the following IBM developer link.  This article provide details on how to install subclipse ( SVN plug-in for eclipse) and create a new project. Also touches on deleting as well. This article assumes that you access your source repository over  http. But you can also access your repository over svn+ssh as well. So while you follow the article, replace http://… with the following if you have to access your repository over SVN+SSH:

svn+ssh://username@host_ip_address/path/to/repository

Let us assume that:

username = ben, host_ip_address=192.168.1.2, repository path  = /home/ben/source

then you would enter

svn+ssh://ben@192.168.1.2/home/ben/source

See the image below that show where to replace http:// with svn+shh://

Comments Off on Eclipse and SVN

Jun 17 2007

How to do a Remote Access of your SVN repository over SVN+SSH

Published by under subversion

SVN repositories can be remotely accessed via http, https, svn, svn+ssh protocols. The secure approach is to use https or svn+ssh. Most of the times, accessing via https is not feasible because of the additional requirement of the SSL certificate to be installed on your server where the repository is. But it is easy to access via SVN+SSH protocol. The reason being that all you need is SSH server in the remote machine and SSH and SVN client on your local machine. If you are repository server is Linux, then SSH comes by default.

Here are the Assumptions:

On the Remote machine where your repository is present:

  • ssh server is up and running
  • you have a ssh login account
  • the user who logs into the machine via ssh has sufficient permission to read/write the “db” directory in the svn repository.

On the Local machine, ( Assume windows )

  • SVN client is installed. If not download it from here and just do a normal install.
  • SSH client is installed. If not install putty. You can download from here and do a normal install

Now follow the procedure to checkout a project from a remote SVN repository

  • Open the windows explorer
  • navigate to the directory where you want the local store to be
  • right click the mouse, and select “SVN Checkout”. If you have installed SVN, this option will show up when you do a right click in the explorer.
  • A window as shown below opens up.
  • enter the svn checkout command. svn+ssh://ssh_username@ssh_remote.machine.name/path/to/repository
  • For example, if theusername is ben and the remote machine name is example.com and path to repository is /home/ben/source, then the above command will look like
  • svn+ssh://ben@example.com/home/ben/source
  • Once you enter this, the local machine will ask for the SSH password. Enter the password. It may ask for more than one time. Just reenter.
  • Now you should see the code checked out into your local machine.

If you dont want to use a graphical SVN client but a command line svn client, then do the following

cd /path/to/local/directory

svn co svn+ssh://ssh_username@ssh_remote.machine.name/path/to/repository

Comments Off on How to do a Remote Access of your SVN repository over SVN+SSH

Jun 17 2007

How to create a SVN repository and import a project

Published by under subversion,Ubuntu

If you are new to SVN, it is a source code control(versioning) tool that is intended to replace CVS. CVS stands for Concurrent Versioning system that is very popular in software development world. SVN tries to address the deficiencies of CVS. SVN can be downloaded at this location.

This post assumes that you have already installed SVN in linux. I am showing here how to create a Source Code repository and import your first project.

Let’s do it

First, create the respository

svnadmin create /path/to/repository

for example, if you want to create the source repository in /home/username/source

then, you would issue the following command in Ubuntu.

svn create /home/username/source

The repository can be anywhere as long as you have right permissions to the directories.

Now, to create your project

Go to a tmp directory

cd /tmp

Then create the following

mkdir yourprojectname

cd yourprojectname

mkdir trunk

mkdir tags

mkdir branches

“trunk, tags and branches” are must for any SVN projects.

Then issue the following command

svn import /tmp/yourprojectname file:///home/username/source/yourprojectname -m “My first project “

Now you can delete the structure created at /tmp directory

rm -rf /tmp/yourprojectname

Hope this helps some newbies.

Update ( 1-2-2009)

How to create a new project over svn+ssh

Assumption: You already have created a repository at /home/username/source/ on the server

Do the following to create a project from your client workstation

svn import -m “your comments here” /tmp/yourptojectname/ svn+ssh://username@host-ip-address/home/username/source/yourprojectname

enter the password when the terminal prompts.

Comments Off on How to create a SVN repository and import a project