My Blog

contains PHP and other web related content. (Sometimes there are some off topic things - don't freak out!)

Eclipse Integration with Tortoise SVN

I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way – it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this – so lets go over the specifics:

To keep a free and open working environment, I create my project folders on the file system, and check out my SVN projects directly into them (of course I script this!). Because of this, I can access my svn and project details outside of any specific tool. I’ve been using TortoiseSVN on windows as a shell integration tool for SVN and have found it the best tool in my arsenal so far. I’ve also been using Eclipse PDT (Eclipse base 3.2 – newest version of PDT from zend.com/pdt) for my IDE recently.

In order to leverage some of the tools in Eclipse, without binding myself to my eclipse project (see: subclipse), I searched for a tortoisesvn plugin. Finally, I found this one. Easy enough to install and use – and added the most popular commands to my right click menu in my PHP Explorer (in PDT)? How could I resist.

Install the Plugin

First off, download the zip file. Put the unzipped folder in your plugins directory for eclipse and launch eclipse. There. All set. Lets configure:

Configure the plugin

There isn’t alot of documentation about the actual features of the plugin. However, after some trial and error, I was able to get it to work successfully. Unfortunately, we have the “What are these for” “extra parts” syndrome. There are some fields I’m not sure what they are…

First off, goto Window > preferences > tortoise.

Next, fill in the first field with the path to your tortoise executable. Mine was:

C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe

Finally, blank out the other two fields and click ok. I honestly have no idea what they’re used for… there didn’t seem to be any difference between having them filled and not. If you know what they’re for, feel free to leave a comment.

Action Time

Now, once you right click on a folder or file in the PHP Explorer in PDT (haven’t tried this in ‘navigator’), you can access tortoise’s menus (almost…) from the tortoise menu option. The actions are taken against the folder / file that you’re right clicked on… so your update, etc, is great.

Over all, I’m pretty happy. This plugin has definitely made itself a nice place in my eclipsie heart.

Tags: , ,

26 Responses to “Eclipse Integration with Tortoise SVN”

  1. Hi – nice post. I am trying out the same plugin for about the same reasons.

    One thing I would like to see is the icon overlays that Tortoise provides in the file system. In Subclipse you are browsing the repo – but I would like to see them in the Project Explorer view.

    When I set up prefs I input the repo URL and the local filesystem location in the fields that you mentioned leaving blank. It didn’t seem to make any difference.

  2. aaron says:

    Yah – I’ve tried but I don’t think that functionality exists – if you figure it out – let me know!
    -aaron

  3. JanKees says:

    Hi,

    I’ve tried using it from the Package Explorer and it also works.

    Thanks for the tutorial!

    JanKees

  4. [...] Eclipse PDT? Check out this wikiAugust 23rd, 2008 by AaronAre you a huge fan of Eclipse PDT (as I apparently [...]

  5. Cris A. says:

    Great tutorial, it helps me alot.. tnx dude.

  6. Joshua says:

    I am a new eclipse user and also found the plugin you mentioned. Unfortunately I can not get this plugin to install at all. It seems my eclipse environment just doesn’t see it. What am I missing? My stats:

    Running Eclipse platform 3.3.2 in windows
    It doesn’t show up anywhere in “Manage Configuration” and I can’t seem to install zips using “Find and Install…”
    Copied to both directories with no luck:
    C:\QNX640\host\win32\x86\usr\qde\eclipse\plugins
    C:\QNX640\target\qnx6\usr\help\eclipse\plugins

    Help, this is driving me crazy! Thanks.

  7. Aaron says:

    @Joshua: You may have to restart eclipse fresh with “eclipse -clean” on the command line – this will rescan for all of your items.

  8. Joshua says:

    Well I did try the -clean and there was still no luck. What I noticed is that Eclipse seems to require a feature.xml file before it will show up at all and this plugin doesn’t have one. How did you get around that issue? Is there a generic feature.xml file I can use?

  9. Aaron says:

    @Joshua: Mine does not have a feature.xml either – what it needs is a plugin.xml file to work properly. Then it also has the jar file, and then an icons folder.
    Sorry man – I don’t know what it could be. Have you tried contacting the author of that plugin?

  10. Anu says:

    I have installed tortoise svn plugin from here http://www.tabaquismo.freehosting.net/ignacio/eclipse/tortoise-svn/subversion.html and noticed when I open the Window >Preferences>Tortoise the dialog has some non English text and am wondering if the plugin I downloaded is the correct one. When I try to commit the files in Eclipse using Tortoise > commit I get the following error when I commit.

    c:\svntemp.svn is not a working copy Cant open file c:\svntemp.svn\svn\entries. The system cannot find the path specified.

    Can you tell why I see the error trying to commit.

  11. Aaron says:

    @Anu: Are you using PHP projects or are you direct linking to the files in your php explorer? I always use “add folder” – and then link to the file system – so it works. Otherwise, I think you have to change that last setting where it says sharedrootfolder and point that to where your actual code resides – your working copy.

    And yes – its not fully english ;)

  12. fierfeu says:

    hello all,

    I have the same pb than Anu and i don’t understand your answer …

    I allready have a PHP Project with Tortoise svn connected to (under explorer) and i addd eclipse tortoise plugin after …

    then it seems that the plugin is unable to find SVN path to trunk

    Fierfeu

  13. Aaron says:

    I wonder if it is that you’re creating projects and importing code – and instead you should be linking directly out to the filesystem?

  14. Bryan says:

    Hello Aaron, do you copy all the contents of the tortoisePlugin folder directly into the eclipse/plugins folder. I simply added the directory tortoisePlugin and it doesn’t work.

  15. Aaron says:

    @Bryan: Yah, you have to copy all of the contents over. :) You may want to restart with ‘eclipse -clean’

  16. Bryan says:

    I still get the “java.lang.NoClassDefFoundError”

  17. Aaron says:

    I’m sorry – I don’t know what else to tell ya! :)

  18. Mihai says:

    Hi, I just wanted to say thanks for the short tutorial.
    It worked easily in my case and I was able to avoid the subclipse errors related to my newer Tortoise Svn client version.

  19. Paulo says:

    Hi David,

    I guess you have already found out that the icon overlays settings can be configured from the SVN Settings Icon Overlays menu. Well, at least in the 1.6 version what might have not been available two years ago…

    Paulo

  20. Priya says:

    Hi,

    Nice post.It was very userful

  21. zolex says:

    hi, i installed this plugin in eclipse galileo, the configuration shows up in the preferences but in no context menu of any navigator like the default one or php explorer etc -.-

  22. please give me the link for downloading the svn plugin for myeclipse

  23. Shreyas says:

    Aaron,

    Would you mind telling us what you mean by linking directly from the file system please?

    Hypothetically, if my workspace is C:\Shreyas\Project1, and then I open my eclipse. Assuming that I edit one of the files under Project1 and want to commit, why do we get the error which Anu is?

    Regards,
    Shreyas

  24. Aaron says:

    @Shreyas: Have you checked out a repository in that working directory? What that sounds like is that you tried to a commit in c:\shreyas\project1 before actually checking out one. With this particular plugin, you have to first view your filesystem, then check out a project in Project1. Then, close eclipse and reopen it. Now, when you do a commit or any other action, it should work. The confusing part with the plugin is that it doesn’t change its menu/context depending on if you have a project checked out or not. Hope this helps!

  25. Gaurav says:

    The link provided in the post to download the plugin (http://tabaquismo.freehosting.net/ignacio/eclipse/tortoise-svn/subversion.html) is not working.
    Can you please provide any other link from where I can download the plugin?

  26. Aaron says:

    Hi – I don’t know where else to get it. I would do a quick google search and see what comes up.

Leave a Reply

  • twitter loader

Follow me on twitter: @aaronsaray

The views on this website are my own and do not reflect the opinions of my employer or clients.
Creative Commons License Home | Open Source | Book | Music | Art | Bio | Resume | Contact
My Baby