Switching a Working Copy

The Switch command is used to change the repository location referred to by a working copy, i.e. the working copy is switched to an alternate location, normally a different branch.

Switching is an advanced topic. See the terminology section for information on situations where switching is appropriate.

When performing a switch operation, Cornerstone will modify your working copy’s contents to reflect the state of the repository at the new location.

Depending on the situation, you may need to switch all or just part of a working copy. It is also possible to switch individual files.

Switching files and folders that contain changes can result in unnecessary conflicts and should be avoided. Consider committing or reverting the changes before switching.

Switching an Entire Working Copy

To switch an entire working copy to a different branch:

  1. Select the working copy in the source list.

  2. Select Switch... from the Working Copy menu.

    Alternatively, select Switch... from the working copy source list’s action menu.

  3. The switch options window is displayed.

  4. Specify the URL of the folder to switch to in the URL field. Click the browse button to select a folder from the open panel.

  5. By default, the working copy will be switched to the latest revision of the folder at the given URL. Use the Revision field to specify a different revision if necessary.

  6. Click the Switch button.

Changes made to the working copy during a switch operation can be reviewed in the working copy’s transcript.

Switching an Individual File or Folder

Switching individual files or folders can make working copy management significantly more complicated.

Consider using an external definition if you need to bring in items from other locations or repositories, particularly if you need to do so as part of the check out process.

To switch an individual file or folder to a different branch:

  1. Select an item in the working copy.

  2. Select Switch... from the Working Copy menu.

    Alternatively, select Switch... from the working copy browser’s right-click menu.

  3. The switch options window is displayed.

  4. Specify the URL of the item to switch to in the URL field. Click the browse button to select a file or folder from the open panel.

  5. By default, the selected item will be switched to the latest revision of the item at the given URL. Use the Revision field to specify a different revision if necessary.

  6. Click the Switch button.

Switched items are identified in the working copy browser by the switched marker .