Home > Articles > Programming > Java

Mastering Subversion in the Eclipse IDE

John Ferguson Smart
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Close WindowJohn Ferguson Smart

John Ferguson Smart 

Learn more…

CVS is cool, but Subversion is cooler. If you're using Eclipse, though, you couldn't take advantage of Subversion until recently. With the advent of Subclipse, Subversion can finally be used to its full effect from within your Eclipse IDE environment.

Introduction to SCM and Subversion

Software configuration management (SCM) is the fine art of keeping source code warm and safe, sharing it with other team members, and protecting it from our own blunders. With a good SCM process, you can easily keep track of releases and new development branches, which makes it much easier to identify and fix bugs in shipped products.

A large number of SCM tools are available, both open source and commercial, such as StarTeam, Perforce, BitKeeper, and ClearCase. In the open source world, the de facto SCM standard is Concurrent Versions System (CVS), which is used around the world for thousands of open source and commercial projects. However, CVS has a number of deep-rooted flaws, which make it less than perfect for modern development projects:

  • Essentially designed for text files, CVS handles binary files very poorly. Binary files are transmitted and stored in their totality at each commit, which represents a waste of both bandwidth and disk space.
  • In CVS, you can’t move files and directories. Your only option is basically to delete and re-add them, losing all the file history in the process.
  • CVS has no notion of atomic commits. Say you commit 10 files to the server, and the commit operation stops halfway through the process. (This can happen quite easily if someone commits a file at the same time, or even if your network fails or your PC reboots.) In this case, the server will have recorded only half of your modifications, leaving the code base in a potentially unstable state.

Subversion is a relatively recent open source SCM tool that was designed from the ground up to overcome the limitations of CVS. It is a finely designed tool with many new features adapted to modern development:

  • Commits are atomic. The repository is not updated unless all the committed files can be incorporated correctly in a new revision, and each new revision is made up of only the changes in a single commit. (No one else’s changes can slip in unnoticed.)
  • Subversion uses a cunning binary diff on both text and binary files, which optimizes both network traffic and repository disk space.
  • In Subversion, each revision represents a copy of the entire directory tree at a point in time. Files and directories can be moved around without limitation.
  • Subversion stores only the delta between each version, which saves disk space, and also means that tagging a new version or creating a new branch is virtually instantaneous.
  • You can access a Subversion repository in a variety of ways, depending on your needs: using HTTP or HTTPS with WebDAV, using the fast proprietary svn: protocol, or directly via the local file system.
  • Share ThisShare This
  • Your Account

Discussions

problem importing project from Eclipse
Posted Apr 24, 2008 01:21 PM by randomnoise
0 Replies

Make a New Comment

You must log in in order to post a comment.

Related Resources

Emily NaveCommunity Tips: Starting a User Group Library
By Emily Nave on August 3, 20102 Comments

The Central Penn Adobe User Group (CPAUG) uses a library program to share books from different publishers with members. A short Q&A with group leader Megan Fister provides some great tips for starting your own.

Keep going with GWT
By Federico Kereki on August 1, 2010 No Comments

I've been using GWT for some years now, and I'm still contented with the easier way for web development. After having written a book on GWT development, doing a blog seemed a good idea for answering questions, and for further expanding topics that didn't get a place in the book.

Emily NaveUser Group Organizations: Finding Support in the Greater IT Community
By Emily Nave on July 29, 20102 Comments

Birds of a feather flock together, right? If you’re already a member of an established user group or looking for other like-minded technology evangelists, connecting with peers is an important part of being an active voice in the IT community.

See All Related Blogs

Informit Network