######################################## ########################################## ##### A quick guide to SVN and Eclipse ##### ########################################## ######################################## by Sean Handley 1. About SVN and Eclipse 2. Setting up SVN 3. Setting up Eclipse 4. Setting up the repository in Eclipse 5. Tortoise SVN 6. Passwords ************************* **About SVN and Eclipse** ************************* (For Windows or Unix) Subversion (or SVN) is a version control system similar to CVS but superior in many ways. It allows any number of people to contribute to a project, usually hosted in a centrally accessible repository. An excellent guide to SVN can be found here: http://svnbook.red-bean.com/nightly/en/svn-book.html Eclipse is an Integrated Development Environment allowing development in many languages but specifically designed to accommodate Java. The Eclipse documentation can be found here: http://www.eclipse.org/documentation/main.html Subclipse is a plugin for Eclipse that interfaces with an SVN repository. Tortoise SVN is a Windows Explorer extension. Whether you'd prefer to use Eclipse, Tortoise SVN or just the basic SVN commandline tool, it is necessary to have SVN installed on your machine. ****************** **SETTING UP SVN** ****************** This is a simple download and installation available from: subversion.tigris.org Make sure you install the latest version if you're going to use Eclipse because the Subclipse plugin doesn't work with earlier versions. ********************** **Setting up Eclipse** ********************** Assuming the JRE is installed... 1. Download Eclipse from http://www.eclipse.org/downloads/ and install. 2. To install Subclipse, follow these instructions: http://subclipse.tigris.org/install.html **************************************** **SETTING UP THE REPOSITORY IN ECLIPSE** **************************************** I have created a repository for our project on the SUCS server. Please familiarise yourself with the concepts of SVN if you have never used it before. To access the repository from Eclipse, select Window > Open Perspective > Other > SVN Repository Exploring Click the Add Repository button at the top-right of the pane and enter: http://www.sucs.org/~talyn256/projects/secondyearproject/source Hit Finish and then enter your login details to access the repository. If you don't have any login details then see me and I'll set them up for you :) To check the files out into your working directory, right click on the entry in the SVN repository pane and select Checkout. At the next window, select the Wizard setup option and proceed to set up the project as a Java project called "SecondYearProject". Once the project is setup and the files are checked out into your working directory, you can access them through the Java Perspective pane (the project will show up in the file navigator). Each time you begin work on the project, you will need to update your working copy from the repository. Right click on the project root in the navigator pane, select the Team menu and choose "Update". You can select files from the tree and edit them as normal. When you have finished making changes, you can right-click the file in the navigator, select the Team menu and choose "Commit". SVN will then synchronise your changes with the central repository. **************** **TORTOISE SVN** **************** Tortoise SVN is a nice little windows explorer extension, available at http://tortoisesvn.tigris.org (a tutorial should be on that page). This is useful if you'd rather not run Eclipse (which can be memory intensive) and want to use another editor. ******************************** **PASSWORDS FOR THE REPOSITORY** ******************************** Each of you will need a username/password to access the repository. These can be set up next time we meet. ------------------------------------------------------------------------- If you have any problems then get in touch with me and I'll do my best to help :) I can be reached via MSN at the_real_sean_handley@hotmail.com, uni e-mail at 320097@swan.ac.uk or via mobile on 07762 033778.