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."
I never understood why IDE integration with Source Control is so important. I think it is much easier to keep track of what you are changing if you explicitly go to the Source Control client and check in/check out exactly what you want. Am I missing something?
When a man lies he murders a part of the world.
... Wait till Eclipse happens, then attempt coup or other act of Subversion.
This is particularly effective in places relying on visual recognition algorithms using only the visual spectrum in ambient light conditions.
Unfortunately it might take several tried to get the timing right, and rebuilding a system just to have another go-around can be too time comsuming for most practitioners.
This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
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?
But it does support versioning the symlink itself (per the FAQ). Do you really want to store multiple copies of the symlink's source?
Dewey, what part of this looks like authorities should be involved?
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.
This is the *one* thing (really, only thing) that I like about VMS...every file is automatically versioned. I create a foo.c, it gets saved as foo.c;1. I edit it, save it, then there's a foo.c;2. I can always go back and look at foo.c;1 if I want and diff the two. What's also really slick is that you don't have to specify the version number ... it always assumes you want the current version, but if you do edit foo.c;1 again, and save it, then it becomes foo.c;3 (because there is already a foo.c;2).
If any other operating system (preferably a Unix-based one)'s filesystem implemented this, I'd be in hog heaven. Reiser is supposed to have the concept of plugins, and I even took a look at the docs, but fs hacking is way out of my league.
You don't get *true* version control, of course...comments, checkouts, properties, etc., but just knowing that you can have an uh-oh moment and go back one or two versions is a real life saver.
Great! Can't wait to get coding in Python and C++ with this excellent IDEA IDE.
Oh, wait. Java only? Nevermind, I'll stick with Eclipse.
Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
With Intellij Idea, this is how it works, with the caveat that the incremental, automatic checkins are done on a local version control system, and the developer decides when to commit to the actual vcs. Like pretty much everything else in Idea, it works great. You get superfine rollback control for even the smallest of changes. The only thing I'd change is to make the versioning persist across Idea restarts.
there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
Our developers transitioned to Subversion about 6 months ago, and since we almost all use Eclipse, we moved to Subclipse. We experienced lots of problems, particularly related to slow performance and branch-to-branch merges behaving strangely. Subsequently we moved to the Subversive plugin, which even in its beta state was more usable for us. Since then it is at RC stage and has proven very good in an environment with sometimes daily branching per developer. It feels much more like the CVS plugin than Subclipse does though that is obviously a subjective thing.
r oject=subversive
It is open source, has frequent updates, and retains a lean feel. Check it out: http://www.polarion.org/index.php?page=overview&p
-- "Vote Democrat. Because the current crop of conservatives are just bugnut crazy."
For the same reason that whenever there's a post about windows, everyone crowds in to sell people on linux - because it's better. Of course, if you do work in languages that aren't primarily Java/Javascript, then it's not for you. But if most of your time is spent in Javaland - my condolances ;) - then Idea is a far superior IDE, and well-worth the money if you're doing it for a living. And if you're broke, there's the EAP, where you get to use the latest stable beta for free.
A friend of mine used to contend that Eclipse should simply use percent of Idea features implemented as their version number, which I found amusingly malicious and sort of true.
there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
Why is this under IT, and not under Developers?
Long live the Speaker Bracelet
Rolo D. Monkey
He said he read the entire manual and still couldn't figure out the most basic of SVN operations? His reading comprehension skills must be so handicapped that I find it difficult to believe he managed to get a wordpress blog running. I downloaded, compiled, and installed subversion without reading the manual and then skimmed over the documentation to get it running. Can't figure out what it means? WTF? Either this guy is from Windows where you don't deal with permissions because you're always an administrator or he has absolutely no business setting up a server of any kind. I got that same error the first time I setup subversion through the Apache module. I immediately said "Oops, forgot to give the apache user write access to that directory, duh." So sorry that every program doesn't have a 2,000 page section in its manual covering the basics of its host operating system.
I've never used either of those repository management programs he speaks of since they are completely unnecessary given how easy it is to manage an FSFS based Subversion repository, but I'm going to go out on a limb here and say they'll work perfectly for every other user.
Actually it is that simple. That command has never failed to create a repository when I used it, and it was a simple matter of double checking the permissions afterwards and are of course easily fixed with a recursive chmod. What are some normal defaults? What do the authors recommend? I thought you read the manual asshole: The shockingly labeled "Choosing a Repository Layout" section. What should the permissions be? Umm, maybe the most restrictive ones necessary for operation, like they are or should be for every program in existence. If you're running it through the Apache module and want to commit changes and therefore write to the filesystem, perhaps the user Apache runs as needs, oh I don't know, write permissions.
Subversion has worked flawlessly and exactly according to the published documentation in every single instance I have used it. The only problems that have ever occurred in relation to it were of my own mistakes (not giving the apache user access, etc.). Given that I find it very hard to believe that someone able to comprehend a revision control system could fail so completely at such a simple task, I find it more likely that this asshole just hates Subversion because it's different and is/becoming more popular than his system of choice.
At least I'll know not to believe a single word from Sebastien Reid if I'm ever linked to his "tech blog" again.
Right now, subclipse is buggy, unreliable and slow, particularly on large projects. I save a lot of time by using the command line svn client.
afaik Subversion needs rw permissions even for "read-only" operations.
-- 'The' Lord and Master Bitman On High, Master Of All
If you buy between (usually) December and January, they offer it as a SUBSTANTIAL discount to individual users. Usually around $250 or less. This is called a "Personal" subscription or somesuch.
Personally, I think it's well worth the money. I've tried Eclipse, and Idea seems a lot more streamlined and less awkward.
No. Idea is also a fairly awesome Javascript editor.
there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
That might be true, I don't know to be honest because I always give rw permissions anyway since I like to check my code in ;) As far as I remember though, the time I screwed that up I was able to check-out my project (a read-only operation) fine - it was when I tried to commit my changes that it threw the permission denied error.
Only if you use the BDB backend. if you use FSFS then it doesn't.
Advanced users are users too!
As much as I aim to avoid MS, it dominates my organisation, and unfortunately the rest of the world. An expensive commercial plug-in from Teamprise was available. So this got me looking around and I found that Visual Studio Team System Foundation Server exposed a soap service for interacting with its repository. So this reminded me of an old Dr. Dobbs article which led me back to the VSTSEclipse project on sourceforge.
The project hasn't released any source yet, however looking at other mailing lists it appeared that there had been some activity in the past. I have a feeling that Teamprise actually bought up the VSTSEclipse team, given that I saw a post where a VSTSEclipse developer claimed to have started working for them. So that leaves you with the question as to who else is doing this. Which leads you to thinking that 'I'd like to write an open sourced intermediary service which communicates with VSTS Foundation Server and exposes a familiar and open interface to the rest of the world; including an Eclipse Plug-in.
Does this exist yet? Anyone else interested?
Last time I checked though, eclipse didn't like symlinks with svn on a mac. It totally hangs when doing anything with a project that has one.
Transitioned? Sounds like you've contracted a pretty severe case of management-speak. Been leveraging one too many paradigm-shifting synergies, perhaps? The word you're looking for is "switched". As an antidote, I recommend playing Bullshit Bingo at your next meeting.
But thanks for the link to Subversive! :)
Actually, he's got a point about Subversion's error messages; they're pretty bad for the "end users"... devs don't care what the server is up to, or how perms are set there, etc. they just want things working. Having a sensible error message that told them "this is probably a server config problem" vs. "your sandbox is hosed, you might want to revert or something" would be really helpful.
;-)
Error/exception reporting is a bit of an Achilles heel for software in general though, not just OSS development tools.
- chrish
A buddy of mine has a nice howto on setting up subversion to tunnel everything over an SSH connection using private keys on Windows. Check it out.. http://marcchung.com/2006/03/11/ssh-remix/