How to use Subversion with Eclipse
An anonymous reader writes "From the beginning, Eclipse included tight integration with the Concurrent Versions System (CVS) in order to provide access to change-management capabilities. Now, many projects -- notably those run by the Apache Software Foundation -- are using a different change-management system: Subversion. This article demonstrates how to add Subversion support to Eclipse and how to perform basic version-control activities from the IDE."
Funnily enough I was setting this up yesterday... and I discovered for Eclipse 3.2 Tigris suggest using Subclipse 1.1.x as explained here. Also, for Mac OS X/Linux you need to first install JavaHL, as explained here.
>>I never understood why IDE integration with Source Control is so important.
IMO, the reason it's desirable is because a separate interface for source control changes your focus. I haven't seen any version control software that is really well integrated. Ideally, vcs (small-caps, version control software) should be invisible -- running in the background, checking out files as you need them, saving revisions with each change, maybe version stamping with each day/build/successful test pass/etc., and only intruding into the developer's thoughts when contention for a file exists. For example, if you're a solo developer you shouldn't even see the source control in day-to-day development. Only when you have an "uh, oh" moment and want to go back should you have to think about bringing up an interface or requesting an older file.
With multiple developers, the same thing. So long as nobody needs a file simultaneously for editing, vc stays out of the way. When two people need it, then the software starts asking questions.
Ideally, I'd like vcs to work like The Wayback Machine (archive.org) -- it's just there, always running, making archives in the background without any effort on the part of the web developer/administrator and nobody's the wiser. If you never need an old version, fine. But if you do, it's there for you.
I've been working with Subversion, especially from within Eclipse using the Subclipse plugin. I had earlier experience with the CVS plugin that comes with Eclipse. This is with Eclipse 3.1.1, Subclipse 3.0.1 and Subversion server version "SVN/1.1.4".
Some bad differences:
Some differences I'm neutral about:
Good things:
8 of 13 people found this answer helpful. Did you?
One, as another posted said, is for integration. If I just changed my files in the IDE, why should I have to go to another window to commit it? It's got integrated tools for exploring revision history, doing diffs, showing annotations, etc. It's handy.
Two, for refactorings. Modern IDEs have support for many common refactorings tasks, allowing you to (for example) pull out new sub-methods and be confident in the knowledge you haven't effected the rest of the program. Ideally, a version-control aware IDE can pass some of this information onto the repository, so when you rename a class, for example, you don't break the history chain.
Eclipse has robust support for version control schemes, and Subclipse (that's the Eclipse SVN plugin) is intelligent enough to correctly handle some refactorings, but not all. Still, they're working on it.
The main advantage of integration with the IDE is that when you rename or move source files, it can automatically do the drudge work for you with svn. This is hugely important in Eclipse because all the fancy refactoring tools make the source tree much more plastic but it's all for naught if you have to go in after the fact and figure out which files got renamed to what manually.
Subversion FAQ about Symbolic Links:
You should also read up on Subversion External Definitions -- it looks as though you misunderstood how they really work.
We call it art because we have names for the things we understand.