Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

7. Version control

Eclipse projects can use cvs and svn as version control system. Git support is in the making. The majority of the project still uses cvs.

7.1. CVS

To access the Eclipse CVS repositories open the "CVS Repositories" view via Window -> Show View -> Other -> CVS -> "CVS Repositories". Create a new entry in the view by right clicking and selecting "New" -> "Repository Location".

Copy the following string and paste it into the CVS view to create a new repository. You can validate the properties via right-mouse click on the entry -> Properties

				
:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
			

Now can you browse the structure and check out code. Check out will create a local copy of the selected path into your workspace.

Not all Eclipse projects are in the same path. For example here are some connection strings.

Table 1. Access to some

ProjectDescription
Eclipse Main:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
Eclipse PDE CVS repository:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse then find the folder "pde"
Eclipse Equinox CVS repository:pserver:anonymous@dev.eclipse.org:/cvsroot/rt

More information about cvs access can be found Eclipse cvs access

Tip

You can browse the CVS source code in the CVS online repository

Tip

Eclipse projects often provide "Project Set Files" (.psf) which allow to checkout a logical connected set of plugins directly from cvs. Via these files you can easily get a consistent working copy of a set of plugins. See Eclipse PSF Wiki for details and see Eclipse PDE contributor Guide for an example.

7.2. svn

The access of Eclipse code via svn is described in Eclipse svn access . For using svn with Eclipse you need the Eclipse subversive plugin. The installation of this plugin is described in Eclipse Subversive

.

7.3. git

The Eclipse code is currently mainly maintained in cvs but this source code is mirrored into Git repositories. You find the Git url for all projects at http://dev.eclipse.org/git/

Tip

Please note that the checkout via HTTP uses a different URL. You can switch to the HTTP urls on the webpage.

Please see EGit Tutorial for details on how to use the EGit plugin for Eclipse or see Git Tutorial to learn how to use Git from the command line.