Searching and filtering
You can search for files, changelists, workspaces, branch maps, streams, jobs, and labels using filters. Each of these has its own filtering procedure, but there are many shared search and filtering tools, which are described here.
Find files in a depot or workspace
To find a file in the depot or in your workspace:
-
Go to Search > Find File....
-
On the Find File tab, under Search in, enter the directory path you want to search. You can drag and drop the file path from the Depot or Workspace tree in the Tree pane.
-
Enter any of the following search criteria:
-
Under Name matches any of the following, select an operator (contains, is, starts with, ends with) and enter all or part of the file name. You can add multiple name match rows.
-
Under Submission date or changelist, enter a date, changelist, or range of dates or changelists.
-
Select Include deleted depot files.
-
-
Click Find.
Click a file in the search results pane to view file details.
Find a file, folder, or specification in the active tab
-
Click Ctrl+F (Windows) or ⌘+F (Mac).
or type -
Enter the search term in the Find dialog.
You can enter any part of a search term to retrieve results, unless you select Match whole word only. To search in a different tab, you must close the Find dialog, go to the new tab, and reopen the Find dialog for search.
Find specifications using filters
To enter filter criteria for most specification types:
-
Click the Filter disclosure triangle in the upper pane of the specification (Submitted, Jobs, Labels, etc) tab.
-
Enter your filter criteria in the appropriate fields.
Use the following buttons to add or delete filter rows:
-
To add conditions, click the plus button.
-
To remove conditions, click the minus button.
-
To nest conditions, enabling a switch in Match criteria (from any to all, for example), click the button.
All retrieves results that meet all of the conditions you enter. It is equivalent to the logical operator "and." Use All to construct more restrictive searches. For example, if you want to retrieve only the jobs that contain both the term "installation" and the term "administration," use All.
Any retrieves results that meet any of the conditions you enter. It is equivalent to the logical operator "or." Use Any to construct less restrictive searches. For example, if you want to retrieve the jobs that contain at least one of the terms "installation" or "administration," use Any.
Note
Some fields may not be visible unless you expand the filter pane manually.
-
You can save and reuse filters, and you can also use the Search menu to initiate searches and select saved filters.
For more information about how to find and filter each specification type, see:
-
For changelists, Checking in files
-
For workspaces, Creating and managing workspaces
-
For branch maps, Managing Branch Mapping
-
For streams, Using the Stream Graph
-
For jobs, Managing jobs
-
For labels, Managing Labels
Save and reuse filters
To save a filter:
-
Open the Add Filter dialog by doing one of the following:
-
In the filter pane, click the Apply saved filters icon and select Save Filter...
-
Go to the Search menu and select Save
<spec type>
Filter...
-
-
On the Add Filter dialog, enter a name and folder location for your saved filter.
The default name is the filter expression.
-
Click OK to save.
To apply a saved filter:
-
In the filter pane, click the Apply saved filters icon or go to the Search menu and select the filter type that you want.
-
Select a filter from the list.
To manage your saved filters:
-
Open the Manage Filters dialog by doing one of the following:
-
In the filter pane, click the Apply saved filters icon and select Manage Filters...
-
Go to the Search menu and select Manage
<spec type>
Filters...
-
-
On the Manage Filters dialog, organize your saved filters by adding, deleting, or moving filters and folders.
-
Close the dialog to save your changes.
To clear a filter, click the Clear filter icon or go the the Search menu and select Clear <spec type> Filter....
Filter with file paths
You can view jobs, changelists, or labels associated with particular files by entering the file path under Files match any of the following file paths in the tab's filter pane, or by using the File Path Builder. You can enter either a depot or workspace file path.
To enter file paths directly into the Files match any of the following file paths field, do any of the following:
-
Use standard Perforce file path syntax (
//depot/folder/folder/filename
or//depot/folder/...
).You can use the standard Perforce wildcards (* and ...) and revision specifiers (@ and #).
For more information about wildcards and revision specifiers, see the Perforce User's Guide, "Issuing P4 Commands".
-
Drag and drop a file path from the Depot or Workspace tree into the field.
-
Click the drop-down arrow to view and select recent file paths.
To get help constructing a file path:
-
Click the Construct a file path icon to open the File Path Builder.
-
Build a file path by selecting any one or combination of the following criteria:
-
Folder path in the depot or workspace.
Click Browse to view the depot and workspace trees and select a path.
-
File name or partial filename, using contains, ends with, or starts with.
-
Revision range:
-
All revisions.
-
Revisions starting or ending at a particular revision number, changelist number, label, workspace, or date/time.
-
Revisions ranging between two revision points (revision number, changelist, label, workspace, or date-time).
You can browse for changelists, labels, and workspaces.
-
As you enter or select values, the resulting file path appears in the Path preview: field.
-
-
Click OK.
The file path that you built appears in the Files match any of the following file paths: field.
All results that meet the search criteria appear in the search results window below.