perforce label does not list files
I created a label using the new label context menu: I defined the pa开发者_运维百科rameters as follows: (unlocked)
Label:
ms_test
Description:
Created by ms
view:
//depot/Projects/Shared/...
//depot/Projects/AddIn/...
The label is created and shown in the label pane but when I select the label and click on the "List files at ms_test" menu item the log message states "Label ms_test points to 0 files
".
Note: I have checked that the view paths are correct and there are file contents and subfolders under then.
I am using P4 client version 2006.1.105584 with no filter on the depot and my client is set to client view of the depotThat means no p4 labelsync
or p4 tag
commands occurred after the p4 label
took place.
Did you create the label as described here?
The following instructions apply to the Windows client (P4WIN) only.
- Click the label toolbar button to show the labels page.
- Make a new label (right-click in the list); Give it a useful description.
- Restrict the View to that needed by the project being labelled (See Using Wildcards and - - Excluding Files for examples).
- Drag the project files from the depot over to the label;
SelectAdd/Replace Files Listed in Label…
from the popup menu.
Perforce will open a dialog offering to replace the contents of the label.- Click Ok to add the files.
Even if your label currently references no files, you still can sync it with files:
- Select the label from the Labels pane
- Right-click to bring up the shortcut menu
- Select Sync specific files to bring up a sync dialog
- Click Select All
- Click Ok
I suspect VonC's answer is pointing in the right direction. On a sidenote, it is worth pointing out that Perforce Labels are badly named and work very very differntly to Labels in virtually any other SCM system.
From the Docs
A Perforce label is a set of tagged file revisions. You can use labels to reproduce the state of these files within a client workspace. Labels provide a method of naming important sets of file revisions for future reference. For example, you might want to tag the file revisions that compose a particular release with the label release2.0.1. At a later time, you can retrieve all the tagged revisions into a client workspace by syncing the workspace to the label.
Create a label when you want to:
keep track of all the file revisions contained in a particular release of software,
distribute a particular set of file revisions to other users, or
branch from a known set of file revisions.
Essentially what this goobledygook means is that whereas most people use Labels to do exactly what a Changelist number does (eg. Mark a particular point in time) it infact marks the set of files currently synced to in a particular client. This is a bizarre quirk of Perforce and possibly the worst design decision they made in an otherwise wonderful product.
You are probably better off taking note of the changelist number you want (generally the latest at a point in time) and the paths you wish to sync to , that is all the information you need to sync to a point in time.
As of Perforce 2010.1, the correct way to do this is using automatic labels, which are really just a way to name a changelist.
精彩评论