Viewing branch differences
You can compare two branches to determine differences between repositories and files. For example, you fixed a bug on the WysiCalc 1.0.x branch. The fix also affects the developers working on version 2.0. You want to make this fix available to them, but first you want to see how the WysiCalc 1.0.x branch is different from the mainline branch.
1. Select a branch or repository.
If you select a repository, differences between the two branches are only displayed for the selected repository.
2. Choose Branch > Branch Differences.
The Branch Differences dialog box opens.
3. Select the branch to compare Branch 1 to from the Branch 2 list. You can also click Browse to select a branch.
Expand the branch to view the child branches.
4. Select Recursive to display all repositories and files.
5. Click Show Differences.
The Branch Differences dialog box opens. Branch 1 contents are displayed in the left pane and Branch 2 contents are displayed in the right pane.
The Differences column displays the reason for the difference.
Column contains | Description | Color |
---|---|---|
<Differences> | The repository contains files that are different. Expand the repository to view specific differences. | Gray |
Identical | The file contents are the same. | White (or default background color) |
Changed | The file contents are different. | Yellow |
Renamed | The file was renamed in one branch. | Green |
Moved | The file was moved from one branch to another. | Blue |
Removed | The file was removed from one branch. | Red |
Missing | The file exists only in one branch. | Red |
Excluded | The file was excluded from one branch based on the template applied to it. | Gray |
6. Select any display options.
- Show identical files displays files with identical contents.
- Show missing files displays files missing from one branch but available in the other branch. If a file never existed in a branch, a filename is not displayed. If the file was removed from a branch, <removed> is displayed.
- Show moved files displays files moved from one branch to another.
- Show changed files displays files with different contents.
- Show renamed files displays files renamed in one branch but have a different name in the other branch.
- Show excluded files displays files excluded from one branch based on the template applied to it, but included in the other branch.
7. Select a file or repository and click the button for the action to perform.
Button | Use to: | More information |
---|---|---|
Differences | Compare a changed file with the file in the other branch. You can only diff binary files if a diff application is configured for the file extension. | Viewing file differences and Setting diff/merge options |
Diff Report | Generate a branch differences report. | Running branch differences reports |
View | View a read-only copy of the file. | Viewing files in Surround SCM |
History | View the file or repository history. Commands such as Edit File, Check Out File, and Rollback File are not available in the History dialog box because they can change the file version. | Viewing file history and Viewing repository history |
Properties | View the file or repository properties. | Viewing file properties and Viewing general repository information |
Remove | Remove a missing file or repository from a branch. | Removing files and Removing repositories |
Restore | Restore a removed file or repository in the branch. | Restoring removed files and Restoring repositories |
Rename | Rename a file or repository to use the name in the other branch. | Renaming files and Renaming repositories |
Promote | Update a file in the ancestor branch with changes from the child branch. | Promoting files |
Rebase | Update a file in the child branch with changes from the ancestor branch. | Rebasing files |
Merge | Merge a changed file with the file in the other branch. | Merging files |
Copy | Copy a changed file to the other branch. | Copying files across branches during check in |
8. Click Close when you finish.