Knowledgebase

Search:     Advanced search

Branching Shared Surround SCM Files

Article ID: 627  |  Last updated: 23 Dec, 2014

Using shared files with branches can lead to situations where the outcome may not be what you expect. These situations are described in the following examples, using the branch, repository, and file structure shown in the image below.

While the examples use promoting to demonstrate what happens to the files, the outcome would be the same if you were rebasing files.

Example 1: Promoting a broken share

After breaking the file.txt share in the b1 branch, you promote the branch. Surround SCM prompts you to break the share in the parent branch for the promote to succeed. You can select one of the files and click Break Share in the Promote Preview or Promote Status dialog box to easily break the share.

Example 2: Promoting two different changes with a broken share

After breaking the file.txt share in the b1 branch, you edit and check in the repo1/file.txt and repo2/file.txt files, with different contents in each file. Next, you promote the branch. When you promote it, Surround SCM prompts you to break the share in the parent branch for the promote to succeed, listing both the break share change and the modified files changes. You can select one of the files and click Break Share in the Promote Preview or Promote Status dialog dialog box to break the share. After the share is broken, each of the modifications to the files can be promoted individually.

If you promote one of the files without breaking the share, the changes are made to both files in the parent branch because they are still shared. Promoting changes from the other file will cause the server to attempt an auto-merge of the contents of the two files to create a combined merge file.

Similar results occur if you rename or remove a file after the share is broken. In this case, you can promote the rename or remove and promote the break share.

Example 3: Promoting a remove of one of the files

After removing the repo1/file.txt file from the b1 branch, you promote the branch. When you promote it, you are prompted to remove the file in the parent branch. Removing a shared file during a promote works as a normal removal of a shared file does. The share is automatically broken for the removal process.

Example 4: Promoting a rename of one of the files

After renaming the repo2/file.txt file in the b2 branch, you promote the branch. When you promote it, you are not prompted to rename the other shared files. When a shared file is renamed, all instances of the share in that branch are automatically renamed.

Article ID: 627  |   Last updated: 23 Dec, 2014
Tags
share files branching

Prev   Next
Using WebDAV with Adobe Photoshop     Checking for Missing System Libraries on Linux