Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Using Subversion with Studio

Subversion facilitates the tracking and versioning of changes developers make to a software project; this enables several people to work on the same project simultaneously without creating conflicts among the changes and additions they make.

Studio enables you to work with Subversion (SVN) in two ways: you can save your Studio project to an SVN repository, or you can import your existing projects from SVN into Studio. To move projects between Studio and SVN, you must first install Subversion’s Subeclipse plugin in Studio.

Installing the Subversion Plugin

  1. Starting from Studio’s application menu, click Help, then select Install New Software…​ 

    help

  2. In the Work with field of the Available Software panel, use the drop-down menu to select
    Subeclipse Update Site – http://subclipse.tigris.org/update_1.8.x.

    subeclipse_select

  3. In the table below the Work with field, click the check box to select both Subeclipse and SVNKit

  4. DESELECT Subclipse Integration for Mylyn 3.x (Optional) so that Studio does not install this portion.

    subeclipse

  5. Click Next to continue.

  6. In the Install Details panel, click Next to continue installation.

  7. In the Review Licenses panel, select I accept the terms of the license agreement then click Finish.

  8. When Mule completes installation of the Subeclipse plugin, click Restart Now to complete the installation and restart Studio. 

    restart

  9. Starting from Studio’s application menu, click Window, (or MuleStudio in Mac), then select Preferences.

  10. Click the expand arrow next to Team, then select SVN.

  11. In the SVN Interface pane, use the drop down menu in the Client field to select SVNKit (Pure Java) SVNKit v1.7.4.9190, then click OK.

    preferences

Committing a Project

You can save a Studio project to an SVN repository so that multiple developers can save changes to the project in a single, shared location. When you have completed your individual work on a Studio project, you can check the project into the SVN repository, thus avoiding version conflicts with other users.

This procedure assumes that you have already created ---and have read-write access to — a shared Subversion repository.
  1. In Package Explorer, right click your project name, navigate to Team, then select Share Project…​.

    team_share

  2. In the Share Project wizard, specify the location of your SVN project in the URI field, then click Next

    repo_info2

    If you have already configured an SVN repository in Studio, you can select Use existing repository location to commit your project to the existing repository.

    existing_repo

  3. In the next wizard panel, specify the name of your project’s folder within the SVN repository. 

    folder_name

  4. Click Next, then edit the commit comments, if you wish, to describe the changes you have made to the project. 

    comment_2

  5. Click Finish.

  6. Studio displays a panel that gives you the option to automatically open Synchronize View, which ensures that your local workspace does not conflict with your team’s repository. Click Yes to open the view and begin synchronizing your workspaces; click No to simply return to your local workspace in Studio.

    perspective-1

Checking Out a Project

You may wish to check out a Subversion project and import it into Studio in order to leverage Studio’s graphical user interface. To do so, you must first install an SVN plugin, then access your SVN project from Studio.

This procedure assumes that you have already created ---and have read-write access to — a shared Subversion repository, and that you have saved to that repository the project you wish to access in Studio.
  1. Starting from Studio’s application menu, click Window, navigate to Open Perspective, then select Other…​

    open_persp_crop

  2. In the pop-up panel, select SVN Repository Exploring, then click OK

    SVN_repo

    To switch back to the Mule perspective, click the Mule icon next to SVN Repository Exploring. You can switch back and forth between perspectives as needed.

    perspectives

  3. After Studio opens the new perspective, SVN Repository Exploring, right-click within the SVN Repositories explorer tab, select New, then Repository Location…​

    repo_location2

  4. In the Url field, enter the location of your SVN repository and click Finish

    add_SVN_cropped

  5. In the SVN Repository Exploring tab, right click your project name and select Checkout. Within context of Subversion, you are checking out the project from your SVN repository. 

    checkout_2

  6. Click the Mule perspective to work on the project in Studio. 

    mule_pers

  7. After you have completed your changes to your Studio project, you must commit your changes to the SVN repository. In the Mule perspective, click File, then Save.

  8. In Package Explorer, right click your project name, navigate to Team, then select Commit…​

    commit_3

  9. In the Commit message field of the Commit Changes panel, enter notes to describe what you have added or changed in the Studio project.

  10. Click the check box next to all items listed in the Files pane, then click Commit to save the changes to the SVN repository.