P4Web Release 2002.2 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 can be referenced by the label.
- Perform a labelsync to populate the label with files. At this point, you select which files, as well as which revisions of those files, that you want to include in the label.
After you have created the label spec and populated your label 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 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 in the label spec. This shows all of the files in 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:
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:
- A changelist number refers to the state of all the files in the depot at the time the changelist was submitted, while a label can refer to any arbitrary set of files and revisions.
- The files and revisions referenced by a label can be arbitrarily changed at any point in the label's existence.
- Changelists are always referred to by Perforce-assigned numbers, while labels are named by the user.
Copyright 2002 Perforce Software.
All rights reserved.