Seapine Labs
Personal tools

Using Labels to Selectively Promote Files

From Seapine Labs

Jump to: navigation, search

Contents

[edit] Overview

Changes rarely consist of a single file. In most cases a change due to a defect fix, change request, or new feature implementation consists of changes to several files.

Depending on the branch strategy being used, once the changes have been made, they need to be promoted to a parent branch. Sometimes, it can be challenging to identify the files related to this specific change in order to promote them. This is especially true if the user promoting the files is not the same user who made the changes.

One way to solve this issue is to use labels to logically group the files. Surround SCM provides filters and an advanced find feature that allow you to get a list of files that match a specific label. You can browse the list of labels, so you don't have to remember the exact label.

Once you have your list of files, you can select them and promote them to the parent branch.

[edit] Use Case

The following illustrates an example of this.

Several files are modified in a baseline branch to implement a new feature. Figure 1 below illustrates the files selected and the Check In Files dialog.

Figure 1 - Check In Files dialog
Figure 1 - Check In Files dialog

Note that the Label check box is selected. When the OK button is clicked, the user is prompted for the new label to create, as illustrated below in Figure 2.

Figure 2 - Create Label dialog
Figure 2 - Create Label dialog

Once the label is created the check in proceeds. Looking at the created label under Tools > Labels shows that all modified files have been associated with the label.

Figure 3 - View Label dialog
Figure 3 - View Label dialog

Now all files are grouped logically by the label. When it comes time to promote the files, the user opens the Advanced Find dialog (Edit > Advanced Find Files), selects Label as the restriction, and browses for the specific label, as illustrated in Figure 4.

Figure 4 - Advanced Find dialog
Figure 4 - Advanced Find dialog

The advanced file results in only the files associated with the label. The user selects all of the files (Edit > Select All) and selects Branch > Promote File. Only the selected files are promoted.

Figure 5 - Promote Preview dialog
Figure 5 - Promote Preview dialog

Note that in Figure 2, the label was scoped only to the baseline branch. If the branch is scoped for the entire mainline, then the user can optionally add the promoted files in the parent branch to the same label.

Figure 6 - Promote Preview dialog
Figure 6 - Promote Preview dialog

[edit] What if I don't want to use labels?

Surround SCM's filters and advance find allow you to filter the file list by other criteria, so labels are not the only option.

[edit] Use the TestTrack defect number

Attach the files related to this change to a defect in TestTrack Pro. The defect number is a searchable field in Surround SCM. Enter a number, and Surround SCM will return all files that have been attached to that defect number.

Figure 6- Advanced Find dialog
Figure 6- Advanced Find dialog

[edit] Use the Check in event and comments

Query the comments of the check in event to identify the files needed to promote. This would require users to enter comments on check ins and follow some guideline of how the comments should be entered. Triggers could be used to enforce this.

Figure 7 - Advanced Find dialog
Figure 7 - Advanced Find dialog

[edit] Use custom fields and workflow

Query the Assigned custom field and the workflow state. If the file is assigned to the specific user and the workflow state indicates that the changes are ready to be promoted, you can use Advanced Find to get theses files.

Figure 8 - Advanced Find dialog
Figure 8 - Advanced Find dialog

[edit] A word of caution

Regardless of the criteria used to retrieve the list of files the promote action will promote the latest version of the file.

For example, if the list of files matches a specified label, the latest version of each file is promoted, not the versions associated with the label.

[edit] Conclusion

Finding a group of files for promotion is easy once you understand the available features. It is just a matter of understanding and using these features to get the most out of Surround SCM.














Issue Management Software | Source Code Control Software | Test Case Management | Requirements Management Software