Apply Labels: apply-label
Use apply-label to label specified file revisions with view or revision labels. The labels must already exist in StarTeam. You can create the labels in StarTeam with the label command.
Syntax
The syntax for this command is:
stcmd{Ex} apply-label [-p "projectSpecifier" [-epwdfile "filePath"] [-cmp] [-csf] [-encrypt encryptionType] ] [-is] [-rp "folderPath" | -fp "folderPath"] [-ifp "file path"|-filter "fileStatus"] [-vl "labelName" | -vd "asOfDate"] [-pattern "date-pattern"] | -vn revisionNumber | -vp promotionStateName] -lbl "labelName" [-q|-pf "filterName"] [-u] [-l] [-ofp "resultsOutputpath"][-folder folderHierarchyPath [-scope FO|FC|FTC]] [-iip] [files...]
Note: -ifp, -folder, and files are mutually exclusive.
Parameters
For information about the command parameters, refer to Operation Parameters.
In addition:
Parameter |
Description |
---|---|
-folder | Specifies the folder/path on which to apply the label. This path must match a StarTeam starting folder from the root folder down to the node folder and begin and end with a / or \. If a folder path is specified, then the files argument is ignored. |
-scope | This argument must use one of the following:
|
Examples
The following example uses apply-label to apply the label Beta to the specified folder Edge:
apply-label –p “user:password@host:port/project/view” –lbl “Beta” –folder “/Stargate/dev/src/Edge/’ –scope FO
The following example uses apply-label to apply the label Beta to files in User Manual, a child of the root folder StarDraw (in the StarDraw view of the StarDraw project). StarTeam applies the label to the revisions of those files that were current at noon on July 7, 2013.
Use -p with apply-label or the stateful set command to set the context of the project/view/parent folder.
stcmd apply-label -rp "1024/StarDraw/StarDraw/User Manual" -vd "07/07/13 12:00 PM" -lbl "Beta" -u -l "*"