How to use Subversion with Eclipse

Discussions

News: How to use Subversion with Eclipse

  1. How to use Subversion with Eclipse (34 messages)

    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. It's based on Subclipse, which is a freely available SVN plugin for Eclipse.

    Threaded Messages (34)

  2. I have been using Subversion and cvs both through Eclipse and Tortoise and my impressions have been very favourable indeed. Subversion is much faster and seems to handle binary files better. The one thing to get your head around is that revision numbering is totally different between subversion and cvs. Suversion uses a weird scheme where the entire repository is upped one revision on each individual commit (the kind of issue we like to call 'a feature' ;-) ). Once you accept that, Subversion is a great alternative and, dare I say it, replacement for cvs. Marc
  3. Suversion uses a weird scheme where the entire repository is upped one revision on each individual commit (the kind of issue we like to call 'a feature' ;-) ). Once you accept that, Subversion is a great alternative and, dare I say it, replacement for cvs.

    Marc
    Marc, from your description it looks you haven't had a chance to appreciate this feature (and this is really a great feature, not a bug). When you do 3-4 concurrent branches of the project with regular releases (e.g. weekly), do continuous merging between them and after that have to stand the audit for the past 6 month - that's where you thank somewhere high in the skies you do not have to wrap your head around cvs anymore ;) And you forgot to mention the breadth of connectivity options Subversion has compared to cvs. Heads up :)
  4. in CVS, when I commit many files for one 'bug', CVN does not have a clue on the interaction among these files. Does Subversion have this feature? Even better. any comparison between the two products?
  5. I have been using Subversion and cvs both through Eclipse and Tortoise and my impressions have been very favourable indeed. Subversion is much faster and seems to handle binary files better. The one thing to get your head around is that revision numbering is totally different between subversion and cvs. Suversion uses a weird scheme where the entire repository is upped one revision on each individual commit (the kind of issue we like to call 'a feature' ;-) ). Once you accept that, Subversion is a great alternative and, dare I say it, replacement for cvs.

    Marc
    Subversion is much faster because it does much of the magic without having to go to the server. For instance it keeps a copy of every file under source local so when you do an undo it just uses the local copy instead of having to go back to the server. Subversion's "weird scheme" comes from having guaranteed atomic commits. Either the entire changeset gets committed or none of it. Why is this transactionality good? Well for one you are 100% sure of what was checked in and you are 100% sure that when you check out an old revision that it is an exact snapshot. This also leads to more bullet-proof branching and tagging. In fact to Subversion a branch is a tag is a branch - what I mean is that they are the same thing. When you do a tag you are tagging a changeset's revision, not just a files. When you branch you are simply saying that updates to that branch should not use changesets from another branch. E.g. Each Rn is a check in. R1 -- R2 ---R4 --- R8 --- R10 -- R11 \ / R3 --- R5 --- R9 \ R6 --- R7 Subversion also handles versioning of folders and the ability to check in meta-data on any folder or file. Subversion was written to be a replacement for CVS. Its vision statement was to fix and improve upon all of the painful parts of CVS. I've used it for several years now and find it vastly superior and easy to learn/use if you know CVS. If you are looking for a great and thin book on Subversion (or CVS) check out "Pragmatic Version Control": http://www.pragmaticprogrammer.com/titles/svn2/index.html ______________ George Coller DevilElephant
  6. This feature is indeed super. I only find one feature missing. Often I want to atomically commit a file set, but with different commit comments per file.
  7. This feature is indeed super. I only find one feature missing. Often I want to atomically commit a file set, but with different commit comments per file.
    May you would put comments about what was changed in the transaction. You can always set a specific property for that. Guido
  8. This feature is indeed super. I only find one feature missing. Often I want to atomically commit a file set, but with different commit comments per file.
    Yeah, I think that would need to be done by convention as opposed to explicit tool support. With TortoiseSVN it is easy to paste in a list of all the files changed in a changeset so it would be easy to comment on each within the single changeset comment. Since each file and folder can have its own metadata I suppose you could store comments there. Every file could have a property "comment" that gets updated before each change set. SVN's command line tools would make it relatively trivial to make simple tools to accomplish this: * clean out all "comment" properties across the code base after a checkout/update * add a file/folder comment with one command It's nice to know that Subversion as a versioning framework supports these kinds of custom requirements. Just need to get the change request going on your favorite SVN client or build it yourself. ______________ George Coller DevilElephant
  9. Subclipse problem[ Go to top ]

    Problem with subclipse is it does do atomic commits accross projects in eclipse (back when I was using it late last year) even though the projects are actually subfolders/modules within a single repository in Subversion (i.e. we have Main.core and Main.util both checked in under the Main repository and checked out via Main). So we switched to IDEA where we imported each module as.. a module and atomic commits works across modules. In eclipse land its projects within workspace, whereas in IDEA land its modules in projects which seems a lot saner and works out of the box.
  10. Re: Subclipse problem[ Go to top ]

    Problem with subclipse is it does do atomic commits accross projects in eclipse (back when I was using it late last year) even though the projects are actually subfolders/modules within a single repository in Subversion (i.e. we have Main.core and Main.util both checked in under the Main repository and checked out via Main). So we switched to IDEA where we imported each module as.. a module and atomic commits works across modules. In eclipse land its projects within workspace, whereas in IDEA land its modules in projects which seems a lot saner and works out of the box.
    Well I mean subclipse doesn't do atomic commits across projects.
  11. atomic commits across projects[ Go to top ]

    that is indeed an issue that still remains with the current version. I agree that it should be adressed Christian
  12. I could be wrong, but I believe that if you are using JavaSVN rather than JavaHL then Subclipse will do atomic commits across projects.
  13. Re: atomic commits across projects[ Go to top ]

    If eclipse does ANYTHING right, Call the cheerleaders man! Cant believe your beefed about functions that dont work. Thats why its called ECLIPSE MAN. It doesnt work! (But we got syntax highlighting) WOOOHOOOO!
  14. subclipse, although very good, breaks my eclipse all the time, and I used different (stable) version already. Now I'm using callisto, with callisto version of subclipse, but even then, it keeps breaking... : ENTRY org.tigris.subversion.subclipse.core 4 -6 2006-07-14 15:42:04.943 !MESSAGE org.tigris.subversion.javahl.ClientException: Working copy not locked; this is probably a bug, please report svn: Working copy 'C:\svn_yelldotcom\com.yell2' is missing or not locked !STACK 0 org.tigris.subversion.svnclientadapter.SVNClientException: org.tigris.subversion.javahl.ClientException: Working copy not locked; this is probably a bug, please report svn: Working copy 'C:\svn_yelldotcom\com.yell2' is missing or not locked at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:453) at org.tigris.subversion.subclipse.core.client.PeekStatusCommand.execute(PeekStatusCommand.java:60) at org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot.peekResourceStatusFor(SVNWorkspaceRoot.java:279) at org.tigris.subversion.subclipse.core.SVNTeamProvider.setProject(SVNTeamProvider.java:143) at org.eclipse.team.core.RepositoryProvider.mapNewProvider(RepositoryProvider.java:207) at org.eclipse.team.core.RepositoryProvider.mapExistingProvider(RepositoryProvider.java:236) at org.eclipse.team.core.RepositoryProvider.getProvider(RepositoryProvider.java:462) at org.eclipse.team.internal.core.TeamHookDispatcher.getProvider(TeamHookDispatcher.java:97) at org.eclipse.team.internal.core.TeamHookDispatcher.getRuleFactory(TeamHookDispatcher.java:105) at org.eclipse.core.internal.resources.Rules.factoryFor(Rules.java:87) at org.eclipse.core.internal.resources.Rules.refreshRule(Rules.java:152) at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1394) at org.eclipse.core.internal.refresh.RefreshJob.runInWorkspace(RefreshJob.java:141) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by: org.tigris.subversion.javahl.ClientException: Working copy not locked; this is probably a bug, please report svn: Working copy 'C:\svn_yelldotcom\com.yell2' is missing or not locked at org.tigris.subversion.javahl.SVNClient.status(Native Method) at org.tigris.subversion.javahl.SVNClient.status(SVNClient.java:114) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:442) ... 14 more
  15. POLARION[ Go to top ]

    So, polarion isn't an open source tool (completely), and is meant to hook you into the company's commercial server, but the subversion plugin it free, and quite nice. I used subclipse for well over a year before discovering polarion, and I'll never go back. It is far more of the goodness I was used to with the CVS plugin - with my favorite SCS.
  16. Good? Are you sure? Even it breaks your eclipse from time to time? I think they really really need to add automatic testcases...
  17. Eclipse Subversive project[ Go to top ]

    fyi http://www.eclipse.org/proposals/subversive/
    The Subversive project is a proposed open source project under the Eclipse Technology Project. This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process document) and is written to declare its intent and scope. This proposal is written to solicit additional participation and input from the Eclipse community. You are invited to comment on and/or join the project. Please send all feedback to the news://news.eclipse.org/eclipse.technology.subversive newsgroup. The goal of project is to create a Subversion plug-in for Eclipse (Platform SVN Integration) with functionality similar to the Eclipse CVS Team project (Platform CVS Integration). After gathering wide community acceptance and reaching a sufficient maturity level, it is anticipated that Subversive will become part of the core Eclipse platform.
  18. I personally prefer subversive to subclipse. Mike
  19. I personally prefer subversive to subclipse.

    Mike
    I haven't tried subversise but I have faced couple of issues with Subclipse (for instance my projects appear 2x times in team synchronizing) so usually I stick to the command line. I should give it a try.
  20. Re: Eclipse Subversive project[ Go to top ]

    I personally prefer subversive to subclipse.

    Mike
    Can you explain why? I tried subversice 6 months ago and it was too buggy for productional usage. the things I need in subclipse: - when I update working copy I want to click in a file listed in console and see the changes dialog - TortoiseSVN like log menu --Mark
  21. Tried Subversive[ Go to top ]

    I tried Subversive, but it doesn't appear to accept a local file url like "file:///C:/Offline/workspace." This does work in Subclipse.
  22. While we are on the subject of Subversion with IDE's here is the introduction of how you do this with the subversion extension to Oracle JDeveloper: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/subversion/subversion.html
  23. Personnaly, I find Subclipse so unusable each time I try it in Eclipse that I change my IDE to IntelliJ IDEA
  24. Comparison[ Go to top ]

    Is there a comparison of subclipse and subversive or can people describe why they use one over the other? As for subversion, it has been by far the best to me. Others have features here and there that are important but for speed, ease of use, and reliability, I wouldn't choose anything else. SCM Comparison http://better-scm.berlios.de/comparison/comparison.html PS The common arguments against subversion mostly go away when you actually use it. I never want to use CVS again... or ClearCase, MKS, Perforce, VSS, and the list goes on. If you are looking for an integrated system on the lines of MKS, look at Polarion (polarion.com). It's subversion backed and it's very very cool.
  25. Re: Comparison[ Go to top ]

    Actually there isn't any public comparison around... You can have a look at Daniel Spiewak's blog, where he compares these two SVN (Eclipse plugin) client (but rather his opinions, than some complete comparison): http://www.jroller.com/page/djspiewak?entry=subversive_and_subclipse I personally prefer Subversive, having used both... After the initial phase, it seems to be more stable, now. And Polarion guys are spending a lot of efforts in supporting SVN.
  26. I have been using subclipse for a while now with no problems. The Systems group uses TortoiseSVN for deployments/config mgmt. Slick. Even non-technical BAs can use TortoiseSVN to version documentation with no significant learning curve. It's fast, acid, and a step up from CVS/VSS.
  27. I've definitely found Subversion to be much nicer than CVS. I consider the version # per entire repository to be a feature, not a bug. I've recently started using Subclipse inside Eclipse for the SVN client; formerly I was using TortoiseSVN. Both are good clients, but I like Subclipse better. I did encounter a few difficulties - see my article on my experience with subversion for more details.
  28. TortoiseSVN is essential.[ Go to top ]

    IDE integration is nice for check-in and checkout but I find the tool TortoiseSVN essential. Just covers more of the SVN features and is very easy to use. It is a must have unless you are a command-line SVN guru (which isn't really that hard either) Wish they made it for "OS X" too - bastards. ______________ George Coller DevilElephant
  29. Re: TortoiseSVN is essential.[ Go to top ]

    IDE integration is nice for check-in and checkout but I find the tool TortoiseSVN essential. Just covers more of the SVN features and is very easy to use. It is a must have unless you are a command-line SVN guru (which isn't really that hard either)
    TortoiseSVN is also essential because not everything that you want to keep in SVN is in an Eclipse project. TortoiseSVN and Subclipse make a good team on Windows, but on Linux/UNIX I guess you would have to use the command line for files that are not in an Eclipse project.
  30. Re: TortoiseSVN is essential.[ Go to top ]

    TortoiseSVN and Subclipse make a good team on Windows, but on Linux/UNIX I guess you would have to use the command line for files that are not in an Eclipse project.
    I'd be surprised that no Subversion client exists for Linux. But like "OS X" there isn't anything as slick as TortoiseSVN. These are small gripes I think since SVN is relatively new. As it catches on I think better tools and integration will follow. Command line is very powerful and doesn't take much to master. Can always write some project-specific scripts to make life easier too. ______________ George Coller DevilElephant
  31. Re: TortoiseSVN is essential.[ Go to top ]

    I'd be surprised that no Subversion client exists for Linux.
    Not so rich as TortoiseSVN, but AFAIK Subcommander runs on Linux. There is also something integrated into KDE and GNOME (more or less in incubation). Obviously, SmartSVN runs on Linux as well. Guido
  32. Here is another article about Subclipse. It is older, but there is section about how to configure development environment and start hacking Subclipse code. Also note that Subclipse team has prepared own proposal for Eclipse and it is soon going to be submitted to Eclipse.
  33. JavaSVN[ Go to top ]

    Just thought I'd throw this out there for people having SVN integration problems... I've had problems with javahl in the past. I've used JavaSVN where possible (ex: JDeveloper and CruiseControl) and things seem to run smoothly.
  34. Re: How to use Subversion with Eclipse[ Go to top ]

    Actually, from the beginning, Eclipses CVS support didnt work at all but thanks for the marketing!
  35. Re: How to use Subversion with Eclipse[ Go to top ]

    Its so easy we have to forum IT Man its so easy!