P4Web Release 2005.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:

  1. 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.
  2. Perform an Add/Replace files... 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 Add/Replace files, 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 on the Labels tab 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 the Labels with files in current path checkbox and click Filter.

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 View files in label from the pulldown menu 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 also use the pulldown 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:


Copyright 2005
Perforce Software. All rights reserved.