domingo, 21 de octubre de 2012

How to install SVN(subversion) and TortoiseSVN


Hi  In this post I describe the steps I took to install SVN in my Raspberry Pi. Please note that I am not an expert, so send any comments you may have with suggestions to improve it.

For anyone working on a project, the advantages of having a repository are countless. To me, one of the aspects I like most of SVN is the log it makes, where you can see how a certain file has been changing in time. This lets you find who did certain thing, when and how. I can´t stress out how valuable this information is to me!

These steps are for a Debian based distro, but should work under others if you adapt the install procedure, and of course, this is not limited to Raspberry.

First of all you have to install the subversion package:
sudo apt-get install subversion

Then you should create a new user account to use SVN and change some permissions:
 useradd svn
 usermod -a -G svn pi #add usr pi to svn group
 passwd svn #change password

Finally you can create a create a repository:
 svnadmin create test
 chown -R svn:svn test
 chmod -R g+w test

At this point SVN is installed on your system and you should be able to use it as usual. The remaining part is just installing TortoiseSVN and connect to an existing repo. To show how to do that, let´s connecto to the test repo we've just created:

  1. Right click in the folder you want to check out the new repo.
  2. Click on SVN Checkout
  3. Type the following address: svn+ssh://pi@192.168.1.17/<absolute path to yout repo>
You have to change the local IP or host name to point to the server where you installed SVN and your username (I used pi for this example). Something that is worth mentioning is that the path to your repo in the previous address must be absolute (I mean /home/John/Projects/ProjectX) since it is passed as is to the ssh server.

If everything is working fine you'll notice there is still something very annoying to fix, the being asked twice or three times for the password thing!! To do so, just follow this link, and of course, if you have any question or difficulties, just send a comment!

Thanks a lot!

No hay comentarios:

Publicar un comentario