Manage labels
You can use labels to:
- Mark important file revisions, for example the set of file revisions used to build a particular software release
- Specify groups of related file revisions in operations such as getting file revisions (syncing) and integration
To use labels, you first define the label and then apply the label to file revisions in the depot. When you define a label, you specify a label view, which limits the files to which the label can be applied.
Create labels
- Select File > New > Label.
- In the Label form, enter a name for the new label.
-
Enter a description of the label.
The Description field accepts:
-
HTML tags for marking up and hyperlinking text. For details, see Format text in Description fields.
-
Comments, provided they are preceded by
##
-
- To prevent other users from modifying the label, select locked.
-
Specify the label view one of two ways:
- Textually: on the Form tab, in the View field, specify the depot location of the files.
- Graphically: on the View tab, select depot paths.
- Click OK.
Label files
To label a file, it must be in the label view and synced to your client workspace.
- Select a file and choose Actions > Label.
- In the Label Files dialog box, enter or browse for the label you want to use.
- Click the Apply label to files radio button.
- (Optional) Add files to the label or remove them by clicking the Add or Remove buttons next to the Files/Folders field.
-
Choose whether to label the latest revision of the files or a specific revision.
You can specify a revision by revision number, changelist, date/time, workspace, or other label.
- Choose whether to exclude deleted revisions of the files.
- Click Label.
To remove a label from a set of files:
-
Select a file and choose Actions > Label.
The Label Files dialog box is displayed.
- Browse for the label you want to use from the Label field.
- Choose the Remove selected label from files option.
- Click Label.
Display and search for labels
To display the labels defined for the Helix Core Server depot to which you are connected, open the Labels tab (click the Labels icon in the toolbar or go to View > Labels).
To search for labels, use the filter fields on the Labels tab. You can filter by any combination of the following:
- Owner
- Label name
-
File paths
You can enter as many file paths as you like. The filter retrieves labels associated with all files in all file paths entered (restricted by any owner and label name included in the filter). You can use the File Path Builder to construct file paths.
Global labels display as gray when you are connected to an edge server. Grayed-out labels are not editable when you are connected to the edge server, regardless of permissions, but you can still use them.
For more information on using filters, see Search and filter.
Edit labels
You can edit a label at any time. Editing a label does not change the list of files to which the label is applied.
- Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
-
Right-click the label and select Edit Label 'label_name'.
The Label form is displayed.
- Enter your changes,and click Save.
Delete and unload labels
Deleting a label makes it unavailable for use and removes the label from files. Unloading transfers infrequently-used metadata from the versioning engine’s database files to a set of flat files in an unload depot. If you unload a label, you can reload it if you change your mind and want to use it again.
To delete a label:
- Go to View > Labels to open the Labels tab.
- Right-click the label and select Delete Label 'label_name'.
To unload a label:
- Go to View > Labels to open the Labels tab.
- Right-click the label and select Unload Label 'label_name'.
To reload an unloaded label:
- Go to View > Labels to open the Labels tab.
- Select the Unloaded icon in the filter pane to open the Unloaded Labels dialog box, where you can filter for and select unloaded labels to reload.
- Right-click the label and select Reload label 'label_name'.
For more information about unloading, see the Helix Core Command-Line (P4) Reference.
Retrieve file revisions in a label
To retrieve a labeled file revision using the Get Revision dialog:
- Go to View > Labels to open the Labels tab.
-
Right-click the required label and select Get Revision.
The Get Revision dialog box opens.
- Click Add to open the Add Files/Folders dialog box.
- To retrieve all file revisions in a label, click the top-level folder (//). To retrieve a subset of the file revisions in the label, browse to the folders and files that you want and select them.
- Click OK to display the selected folders in the list of files to be retrieved.
- To ensure that your workspace contains only the labeled file revisions, select Remove files from workspace if they are not in label.
- Click Get Revision to retrieve the labeled file revisions.
Display files associated with a label
To display all files associated with a label, do the following:
- On the Labels tab, make sure the bottom pane including the Details and Files tabs is expanded (visible). If it is not, move the pointer over the bottom tab border until it changes into up/down arrows; then click and drag it upward to expand the pane.
-
Select a label to display its associated files in the bottom pane.
- In the bottom pane, click the Files tab to view the list of files associated with the label.