SVN

SVN or Subversion, allows multiple developers to work on the same project. The project is usually maintained at the server, and the ones that are working on it do a checkout (creating a local copy) of the files from the server. It is also possible to commit the modified files back to the server. In order to perform any operation, there is need for connecting to the server.

SVN, in contrast to CVS, can track not only file change history, but all the changes regarding the shared projects, such as allowing the addition, deletion or removal of all resources without creating new items, and losing information about deleted ones. A commit operation in SVN is absolutely atomic, that is, the repository will never reach an inconsistent state, and versioned properties' support is available.

Eclipse does not come with an SVN client integrated by default. It is necessary to install an additional plugin, namely the Subversive project. Nonetheless, it is maintained as an Eclipse project in the Eclipse portal. Another option is to make use of the Subclipse project (http://subclipse.tigris.org/). The Subversive plugin aims to integrate the Subversion version control system with the Eclipse platform. The plugin allows the possibility of working with projects stored in Subversion repositories directly from the Eclipse workbench, in a similar fashion as other Eclipse version control providers, such as CVS and Git.

The project was started in 2005 by the Polarion Company as an open source project and was later migrated under the Eclipse umbrella as an official Eclipse project in 2007. Nowadays, the Subversive project consists of the Subversive plugin for Eclipse, developed as an Eclipse open source project, along with the Subversion connectors, developed as an external open source project.

Subversive has been designed to be used as a full-featured SVN client, so it is possible to update, commit, merge changes, work with SVN properties, view change history, and perform other operations with SVN directly from the Eclipse environment. Moreover, Subversive evolves together with the Subversion project to provide Eclipse users with the features that appeared in the new versions of the SVN implementation.

The Juno version of the plugin can be installed using the update-site http://download.eclipse.org/technology/subversive/1.0/update-site-1.0.1/.

In order to install it, simply navigate to Help | Install new Software and add the update site as shown in the following screenshot:

SVN

In order to exemplify the use of SVN, we are going to use the Apache Hadoop repository as the basis. In order to associate a repository with the Eclipse workspace, you need to navigate to File | New | SVN | Repository Location and fill the following screen with the server location http://svn.apache.org/repos/asf/hadoop/common/. Have a look at the following screenshot:

SVN

After you have clicked on Finish, the repository will be added to the SVN Repositories view, and it will be possible to view the trunk, branches, and tags nodes here. In the trunk node, you will see all the maintained files and early revisions. It is possible to select a start point by selecting a specific revision.

SVN

There may be more than one branch on a given version control system that can be selected in the branch node.

The tags are usually defined to make it easier to go to a specific revision of the product, relating it to a commit; for example, to specify a product version number.

The operations related to Checkout, Update, and Commit are pretty similar to what we have presented in the CVS section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset