Tags and Branches

Fundamentally, a tag or branch is nothing other than a copy of a specific revision of your project folder located in a known location in the repository.

See the Terminology section for definitions of the terms tag and branch.

Conventions

Subversion repositories are generally structured in a standard way, with each project having at least the following top-level folders:

Projects which import assets from other projects may also have a top-level vendor folder, which is used to manage copies of imported files although this is much less common than the folders described above.

While creating the above folder structure for your project is a standard convention with Subversion repositories, neither Cornerstone nor Subversion enforce this structure.

If you would rather define your own repository layout then you are free to do so.

See Q & A for answers to common tagging- and branching-related questions.

Creating a Tag

While Cornerstone provides full support for creating tags and branching by copying, the dedicated Tag... and Branch... functions in the File menu make it even easier, especially if your project follows the conventions described above.

To create a tag:

  1. Select the folder you wish to create a tag for in the repository browser.

  2. Select Tag... from the File menu or click the Tag buttonin the toolbar:

  3. The tag options window will appear next to the selected folder.

    If the selected folder is located in trunk or branches then Cornerstone will calculate the location of the related tags folder and suggest it as the location of the tag.

  4. Specify the name of the tag in the field labelled Tag As. This will be the name of the tag folder and must be unique in the tags folder.

  5. Specify the URL of the folder that will contain the tag in the Where field. Cornerstone will suggest a default location based on the URL of the folder to be tagged. The suggested value can be changed if it is not appropriate.

    The Where field accepts relative URLs, with values displayed in repository-relative format by default.

  6. Specify the revision to create the tag from in the Revision field. The default value is HEAD, which is appropriate for most scenarios.

Creating a Branch

Creating a branch is similar to creating a tag:

  1. Select the folder you wish to create a branch for in the repository browser.

  2. Select Branch... from the File menu or click the Branch button in the toolbar:

  3. The branch options window will appear next to the selected folder.

    If the selected folder is located in trunk or tags then Cornerstone will calculate the location of the related branches folder and suggest it as the location of the branch.

  4. Specify the name of the branch in the field labelled Branch As. This will be the name of the branch folder and must be unique in the branches folder.

  5. Specify the URL of the folder that will contain the branch in the Where field. Cornerstone will suggest a default location based on the URL of the folder to be branched. The suggested value can be changed if it is not appropriate.

    As with the tag options window, the Where field accepts relative URLs, with values displayed in repository-relative format by default.

  6. Specify the revision to create the branch from in the Revision field. The default value is HEAD, which is appropriate for most scenarios.

Creating a Tag or Branch by Copying

To create a tag or branch:

  1. Select your repository from the repository source list.

  2. Browse through the repository to find the folder you want to tag (or branch).

  3. Copy the folder to your tags or branches folder by holding down the Option (⌥) key while dragging the folder.

  4. An options window will appear when the folder is dropped.

    Specify the name of the tag or branch and the revision to copy from.

  5. Click the Copy button.

Tags and branches can be renamed and deleted just like any other folder.

See Tags and Branches in the Terminology section for more information on the differences between tags and branches.