P4Web Release 2003.1 User Guide
[Getting Started] [How To...] [Browser Tips] [Glossary] [Road Map]
Working with Labels
A label is a way to mark a particular set of file revisions for later access. For example, release engineers might want to keep a list of all the file revisions that comprise a particular release of their program. This list of files can be assigned a name, like release2.0.1; this name is a label for the list of files that they select. At any subsequent time, that label can be used to refer to those labels specifically when syncing, branching, or comparing files.
There are essentially two steps to creating a label:
- Create the label spec, which defines the name of the label and label view. The label view limits which files will be tagged with the label.
- Perform a labelsync to tag the files with the label. At this point, you select which files, as well as which revisions of those files, that you want to tag with the label.
After you have created the label spec and tagged the revisions using labelsync, you can use that label to access those files at a later date.
See Creating and Editing Labels for additional information.
Since both labels and changelists are used to refer to a set of files, why not just use changelist numbers?
Accessing labels
Click Go To->Labels to view a list of all labels known to the Perforce server.
If you prefer to see only the labels that contain tagged files in your current path, select Show -> Labels with files in current path.
Label Spec Detail
Clicking on a label name shows you detailed information, including
the label spec's fields.
For information about these fields, see
Creating and Editing Labels.
Select Show -> Files in label to view a list of the files tagged by the label. This shows all of the files tagged by the current label, including each file's path in the depot, the filetype, and the revision number of the file.
From this page, you can use the Run menu to:
- Edit the label spec.
- Delete the label spec.
- Tag files with labelsync.
- Sync the workspace to the files tagged with this label.
- Create a new label, using this label as a template.
For information on creating a new label without using a template, see Creating and Editing Label Specs.
Why not just use changelist numbers?
Labels share certain important characteristics with changelist numbers, as both refer to particular file sets, and both act as handles to refer to all the files in the set. But labels have some important advantages over change numbers:
- The file revisions tagged by a particular label can come from different changelists.
- A changelist number refers to the contents of all the files in the depot at the time the changelist was submitted, but a label can refer to any arbitrary set of files and revisions.
- The files and revisions tagged by a label can be changed at any point in the label�s existence.
- Changelists are always referred to by Perforce-assigned numbers, but labels are named by the user.
Copyright 2003 Perforce Software.
All rights reserved.