Working with Branches in Subversion

See Also

The IDE's Subversion support enables you to:

For more information on working with branches, see the Subversion documentation at:

Checking out branches

If you need to edit files on a branch folder that already exists, you can checkout the branch to copy the files to a local working directory. You must however create a new local working directory within which to checkout the branch.

To checkout a branch to your local working directory:

  1. Choose Team > (Subversion >) Checkout from the main menu. The Subversion Checkout wizard opens.
  2. In the first panel of the wizard, enter a URL that contains the connection protocol and location to the repository. Depending on your protocol selection and connection requirements, enter any required parameters, such as username, password, proxy configuration, etc. Click Next.
  3. In the Folders to Checkout panel of the wizard, specify the folder that represents the branch you want to check out in the Repository Folder(s) field. You can click the Browse button to choose from a list of all folders in the repository. Specify the revision number if you want to work from a specific revision.
  4. Specify the local working directory into which you want to checkout the selected branch folder. Alternately, you can click the Browse button to navigate to the desired directory on your system.
  5. Click Finish to check out the branch folder. The IDE initiates the checkout action and the IDE's status bar indicates the progress of the files downloading from the repository to your local working directory. You can also view files being checked out from the Output window (Ctrl-4).

Creating branches

If you want to work on a separate version of your file system for stabilization or experimentation purposes, you can do so by creating a branch. To create a branch in Subversion, you are effectively copying a version-controlled project or folder and adding it to a new location within the repository. The IDE's Subversion support enables you to select a source from either your local working copy, or browse to a location in the repository you are working from. You can create branches in the IDE by choosing Subversion > Copy To from a versioned file or folder's contextual menu.

To create a branch:

  1. Select the versioned project or folder (e.g. in the Projects, Files, or Favorites window) that you want to be the root of your branch and choose Subversion > Copy To. The Subversion Copy dialog box opens.
  2. Under Source, select Local Folder if you want to create a branch from your local working copy, otherwise select Remote Folder to specify the version maintained in the repository.
  3. Under Destination, select the target location for the new branch copy. In Repository Location, type in a path relative to the repository, otherwise click the Browse button to open a new dialog that aids in browsing the repository folders.
  4. Enter a description for the new branch folder in the Copy Description text area. If you want to switch to the branch after creating it, select the Switch to Copy checkbox.
  5. Click Copy. The IDE creates the branch by copying the folder contents to the specified location in the repository.

Switching to a Branch

If you want to switch your local working copy to point to a branch or other location in the repository, you can do so using the Subversion Switch to command.

To switch to a branch or other location in the repository:

  1. Select a versioned file or folder (e.g. from the Projects, Files, or Favorites window) and choose either Subversion > Switch to Copy from the right-click menu or Team > (Subversion >) Switch to from the IDE's main menu. The Subversion Switch dialog box opens.
  2. For Repository Folder, enter the branch folder you want to switch to, or click Browse to view a list of all locations in the repository.
  3. Click Switch. The IDE updates your working copy to reflect the content maintained by the newly selected branch location in the repository. Note that any differences arising between your local working copy and the location that you are switching to will be overwritten by the new location.
See Also
Checking Out Files from a Subversion Repository

Legal Notices