Mar
15

Throughout the parts of this text I've used TortoiseSVN to perform all repository actions. This was mainly due to the simplicity and ease of use TortoiseSVN affords. TortoiseSVN is also handy when versioning assets that aren't code-related like spreadsheets and general documents. When working with code - ColdFusion for instance - there are other Subversion clients that work just as good as TortoiseSVN and don't require you to leave your development environment to request repository updates or commit changes. One such tool is Subclipse which is built on the open-source Eclipse platform. Eclipse is an extremely popular Java-based programming tool that works with just about every modern programming language. I use Eclipse and Eclipse plugins like CFEclipse on a daily basis to manage my code. In the this section, I discuss installing, configuring, and using Subclipse, the Subversion plugin for Eclipse.

Continue Reading

Aaron West's Gravatar
About this post:

This entry was posted by Aaron West on March 15, 2007 at 10:14 PM. It was filed in the following categories: ColdFusion, Apache, Subversion, Eclipse, CFEclipse, TortoiseSVN, Subclipse. It has been viewed 61604 times and has 23 comments.

5 related blog entries

23 Responses to Part 5: Accessing Subversion Repositories With Subclipse

  1. Sue W

    Hi Aaron,

    Thanks for this. I just had to re-install Eclipse & plugins because something went horribly wrong on my system, and although I had done this a while ago (& made a doc for others to follow) it is still reassuring to go along with someone else's steps.

    Keep up the good work!

  2. I'm glad you found it helpful Sue. Thanks for your comments.

  3. Hey Aaron,

    I noticed that you set up your repository via Tortoise. We plan on using Subclipse as our client of choice. If I don't set up Tortoise on our Subversion server, do know if it is possible to create our repository via Subclipse? If not, would you recommend installing Tortoise simply for the purpose of creating the repository? And can I assume that the repository will work the same regardless of which method is used to build it?

    Thanks,
    -Jim

  4. Jim, you can use whichever tool you want - TortoiseSVN or Subclipse - to set up your repository on the server. TortoiseSVN has advantages from the server perspective in that a) you don't have to have remote access set up and working yet and b) you definitely want some sort of local (on the server) way to manage your repositories should remote access fail.

    I guess I would recommend installing TortoiseSVN on the server and using that to get the ball rolling. Then, when you have things straight, developers can begin utilizing Subversion with the Subclipse plugin. Make sense?

  5. Yes, makes sense ... thanks. But I was under the impression that even if you wanted to, you can't set up a repository through Subclipse. Does this sound accurate?

  6. I was thinking you could create repositories using Subclipse but upon further review it doesn't look like that's possible. And it makes sense too, since Subclipse hooks to existing repositories only and does not allow one to introspect a Subversion server. So, your best option is to use other Subversion client tools like TortoiseSVN. Thanks for bringing this up Jim.

  7. Thanks Aaron. I've used TortoiseCVS, but haven't used Tortoise for SVN. I will definitely give it a whirl ;)

  8. Shaji

    Aaron,
    I found you on Shlomy's blog.

    Thank you for sharing this. I use Eclipse and CFEclipse and VSS plugins. I will try subversion..

  9. Shaji, let me know what you think once you've have a chance to work with Subversion. I think you'll be very happy with it, especially coming from VSS.

  10. As mentioned on this weeks ColdFusion Weekly, there is also SmartSVN (http://www.syntevo.com/smartsvn/) as an alternative to TortoiseSVN. A free and paid version are both available, and it is a cross platform Java utility. Might be worth a look.

  11. Great article!

    I've given well deserved credit on my own blog :)

  12. Mark

    i do have one question, and i apologise in advance if it's a not so bright one :-) .. If you set up Tortoise SVN then go ahead and setup subclipse is it creating a seperate repository ? Using this would i have to update the subclipse repository then go back and update Tortoise as well ? Or is subclipse merely referencing the same Tortoise set.

    if that doesn't make any sense just let me know

  13. Mark, in most cases yes, you would be creating two separate repositories. One managed with Subclipse and one managed with TortoiseSVN. I'm not sure why you would want to do this, unless it's to try and use features of TortoiseSVN and features of Subclipse on one repository. Personally, I would just pick the right Subversion client for the job and stick with it. For code-specific repositories, I recommend using Subclipse exclusively. For non-coding projects you might want to use a Subversion client outside of the Eclipse environment. For this I recommend TortoiseSVN or SmartSVN (I'm recommending SmartSVN blindly as I have no direct experience with it).

  14. David Lincoln

    Just a thanks for publishing this. I have been using Subversion on our local network for about a year. I wanted internet access to my source repositories but not being familiar with Apache, I wary of stumbling into a "black hole" that some software configuration projects seem to impose on all available work hours. You saved my from a black hole! -dwl

  15. David, thanks for the comment. I've not saved someone from a black hole before; that's pretty friggin sweet.

    Don't feel bad about the barriers to getting into Apache - you are by no means alone. It took me a few years to take the leap and become comfortable admin-ing an Apache Web server. I'm still learning. ;-)

  16. DK

    Aaron,
    thanks... this series really helped me get svn up fast! The official docs were a bit heady lol.

  17. Jason

    Thanks Aaron..this helped me out a lot!
    I was hoping you could answer a question for me though...After I edit files on my local project, then commit them - is there a way through subclipse to have the remote repository update the actual file without remoting into the server and doing right click, svn update?

    Thanks so much!

  18. Jason, I'm not sure what you mean by "to have the remote repository update the actual file..." When you commit files, the remote repository IS updated and holds the new revision. If you are wanting other working copies - like members of your team - to get your committed updates they will have to run an svn update. Let me know if this helps or if I'm missing the point of your question.

  19. Jason

    What I mean was the actual file in the directory..for example...

    If I have my root at d:\inetpub\wwwroot\
    and my svn repository in c:\svnrepository

    when I commit a file, its not actually updating the file in d:\inetpub\wwwroot..so I can't actually test it without having a local copy of coldfusion (which I don't really want)

    does that make sense? basically, it seems to be updating the repository, but not the actual file from the website

  20. Jason, I think I get what you're saying. You don't want to run a local copy of your Web site (though with the developer version of ColdFusion I would recommend it) but you want your *real* site updated when you commit changes to your Subversion repository. Is this correct?

    In terms of having your Web site code automatically updated when you commit, I don't think this is possible. And honestly, it kind of goes against the idea of source control management. However, I know folks who install a Subversion client (like TortoiseSVN) on their production server, hook it to their repository, and run an "update" statement when they want to bring new code into the production environment. This is a common way teams handle code deployment.

    Personally, I prefer other mechanisms like using Subversion's export feature in conjunction with ANT. This allows you to export your repository to a temporary directory and "sync" the temporary directory with your actual Web site. New files would be added to your Web site, updated files would be, well, updated, and files removed from the repository would be removed from your site. This type of workflow provides the highest level of control and while not fully automated - which you seem to desire - it's the best solution in my opinion (whatever that is worth).

  21. Greg

    I may be misunderstanding Jason, but I think the functionality he is looking for would be a post-commit hook in Subversion.

    We commit via Subclispe, then post-commit auto-updates a remote version of the project's "public" website, which is just a working copy on the remote server which only gets updated (no direct coding).
    Theoretically, each developer can have a "personal" working web site updated from branch commits while under developement with the "main" project site only being updated upon a commit to trunk so that it is always stable.

    Used in combination with Trac, it's a nice setup.

  22. Greg, thanks for your comments. What you suggest sounds exactly like what Jason is looking to do.

  23. Shaji

    If upgrading to apache 2.2 and Eclipse crashes, read at http://subclipse.tigris.org/faq.html#win32-crash.

    It happened to my co-worker today and read his blog at http://www.coldfusioncommunity.org/profiles/blog/s...