P4V User Guide: September 2018
P4V User Guide: September 2018
2018.3
September 2018
Copyright © 1999-2018 Perforce Software.
All rights reserved.
Perforce Software and documentation is available from www.perforce.com. You can download and use Perforce programs, but
you can not sell or redistribute them. You can download, print, copy, edit, and redistribute the documentation, but you can not sell
it, or sell any documentation derived from it. You can not modify or attempt to reverse engineer the programs.
This product is subject to U.S. export control laws and regulations including, but not limited to, the U.S. Export Administration
Regulations, the International Traffic in Arms Regulation requirements, and all applicable end-use, end-user and destination
restrictions. Licensee shall not permit, directly or indirectly, use of any Perforce technology in or by any U.S. embargoed country or
otherwise in violation of any U.S. export control laws and regulations.
Perforce programs and documents are available from our Web site as is. No warranty or support is provided. Warranties and
support, along with higher capacity servers, are sold by Perforce Software.
Perforce Software assumes no responsibility or liability for any errors or inaccuracies that might appear in this book. By
downloading and using our programs and documents you agree to these terms.
Perforce and Inter-File Branching are trademarks of Perforce Software.
All other brands or product names are trademarks or registered trademarks of their respective companies or organizations.
Any additional software included within Perforce Software is listed in "License statements" on page 188.
Contents
3
Searching and filtering 34
Find files in a depot or workspace 34
Find a file, folder, or item in the active tab 35
Find specs using filters 35
Customize Depot and Workspace views using filters 35
Save and reuse filters 37
Filter with file paths 37
Reconciling offline work 38
Exporting files 39
Formatting text in Description fields 41
3 | Configuring P4V 42
Configuring P4V preferences 42
Connections 43
Streams 44
Server Data 45
Behavior 46
Double-click 52
Shortcuts 52
Logging 52
Display 53
Files and History 53
Features 54
Tools 54
File Editors 55
Diff 56
Merge 56
Applets 57
Editing user preferences 57
Viewing effective settings 59
4 | Managing files 60
Adding files to the depot 60
Retrieving files from the depot 61
Editing files 62
Reverting files 62
Checking in files 63
View changelists 64
4
Submit changelists 64
Reverse a changelist submission 65
Restrict access to a changelist 66
Configure changelist display 66
Undoing changes 66
Displaying revision history 68
Files 68
Folders 69
Changelists 70
Changing a file’s type 70
Renaming and moving files or folders 71
Cleaning up files and directories 71
Deleting files 72
Diffing files and folders 72
Diff dialog options 73
Check workspace consistency 74
View the state of the depot at a specified point in time 74
Diff large files 74
Shelving files 75
Shelve checked-out files in a pending changelist 76
Unshelve files 76
Submit shelved files 77
Delete shelved files 77
5 | More file management tools 78
Viewing codeline history in the revision graph 78
Read the revision graph 78
Navigate the revision graph 79
Filter the revision graph 79
Display details 80
Viewing file history with Time-lapse View 80
Toolbar 81
Slider 82
Viewing image file history with Time-lapse View 82
Using the folder diff utility 84
Diffing text files 86
Diffing images 86
5
Merging files 87
6 | Managing codelines 88
Creating branches 88
Merging files between codelines 89
Open files for merge 90
Resolving files 92
Resolve individual files 92
Resolve multiple files 94
Managing branch mapping 95
Work with branch mapping 96
Managing labels 98
Create labels 99
Label files 99
Display and search for labels 100
Edit labels 100
Delete and unload labels 100
Retrieve file revisions in a label 101
Display files associated with a label 101
Managing jobs 102
Create a job 102
Add a job to a pending changelist 102
View jobs 102
Search for jobs 103
7 | Advanced P4V options 110
Configuring custom tools 110
Environment considerations 110
Add custom tools 110
Import and export tools 113
Launching P4V components from the command line 114
8 | Working with streams 115
About streams 115
The mainline model 115
Stream views 115
Propagating change between streams 116
Stream depots 116
Terminology differences between command line client and P4V 118
6
About stream views 118
Stream path types 118
Stream path syntax 119
Inheritance between parents and children 119
Examples 120
Setting up streams 124
Creating new streams 125
Creating stream workspaces 126
Selecting streams 127
Using the stream graph 127
Stream Graph display conventions 128
Configure the stream graph display 129
Display stream status 130
Work in a stream 130
Branching with Streams 131
Merging down and copying up between streams 132
Merge down 133
Copy up 133
Propagate change between unrelated streams 133
Deleting stream files and streams 134
Working with task streams 135
Overview 135
Create a task stream from a parent stream in the same depot 136
Create a task stream in a different depot 136
Create a task stream without a parent 137
Convert a task stream to a regular stream 139
Delete and unload task streams 139
Filter task stream files out of File History results 140
Working with virtual streams 140
View virtual streams 141
Stream path behavior in virtual streams 142
Create a virtual stream 143
Submit changes to a virtual stream 144
Merge and copy to a virtual stream 144
9 | Using P4V for distributed versioning 145
Understanding DVCS and setting up the server 145
7
Init 145
Read this first 146
Directories and files 146
Add files 147
Clone 147
Prepare to fetch and push content between servers 148
Fetch and push 148
Configure security for fetching and pushing 149
Specify what to copy 149
What do Fetch and Push copy? 149
Resubmit 150
Branches 150
Understanding remote mappings 151
10 | Integration with Swarm 153
Review workflow 153
Setting up the Swarm integration 154
Swarm integration features 154
Request a review 154
Update a review 159
Open a review in Swarm 165
Review ID and Review State columns 168
Reconnect to Swarm 169
Glossary 170
License statements 188
8
How to use this guide
This guide tells you how to use P4V, the Helix Visual Client. It is intended for anyone using P4V to
perform version control management tasks with Helix Server.
Feedback
How can we improve this manual? Email us at [email protected].
Other documentation
See https://www.perforce.com/support/self-service-resources/documentation.
Syntax conventions
Helix documentation uses the following syntax conventions to describe command line syntax.
Notation Meaning
literal Must be used in the command exactly as shown.
italics A parameter for which you must supply specific information. For example, for
a serverid parameter, supply the ID of the server.
[-f] The enclosed elements are optional. Omit the brackets when you compose
the command.
... n Repeats as much as needed:
l alias-name[[$(arg1)...
[$(argn)]]=transformation
n Recursive for all directory levels:
l clone perforce:1666 //depot/main/p4...
~/local-repos/main
l p4 repos -e //gra.../rep...
element1 | Either element1 or element2 is required.
element2
9
What's new in this guide for this release
n Added a new tab dedicated to the Stream graph, with its own configuration toolbar. This change
comes with improvements to the filter pane, and the Graph Navigator now opens in a floating
window. See "Using the stream graph" on page 127.
n Added an option to reconnect to Swarm if the connection is interrupted. See "Reconnect to
Swarm" on page 169.
n Added an option to filter the depot tree by depot type. See "Searching and filtering" on page 34.
n Added new preferences:
l Prompt for name when creating new workspace. See "Behavior" on page 46
preferences.
l Warn before checking out files, if the number of files exceeds <xxx>. See "Behavior"
on page 46 preferences.
l Update files when modifying workspace mappings. See "Behavior" on page 46
preferences.
l Automatic Safe Resolve (no merging) when syncing files. See "Server Data" on
page 45 preferences.
l Update workspace files on stream switch. See "Streams" on page 44 preferences.
n Added an option to get the previous revision of files in a changelist. Also introduced other changes
around getting revisions to make this feature more intuitive and expanded the documentation to
provide more clarity. See "Retrieving files from the depot" on page 61n and "Displaying revision
history" on page 68.
n Added an option to remove unchanged files when deleting a stream spec. See "Deleting stream
files and streams" on page 134.
n Added support for faster reconcile operations. When the Modtime option is set for the workspace,
P4V now minimizes costly digest computations on the client by checking file modification times
before checking digests to determine if files have been modified outside of P4V. See "Create a
workspace" on page 16.
10
1 | Introduction
This chapter includes introductory topics to help you get started with P4V, the Helix Visual Client.
Basic concepts
The Helix Core Server is an enterprise version management tool that you can use to manage source files
and other documents, such as multiple revisions of a manual, web pages, or operating system
administration files. The files managed by the Helix Core Server reside in a depot. To work on files, you
open the files and edit them in your workspace. When you’re done, you submit changed files to the depot
using a changelist. The depot keeps track of all of the current and previous revisions of a file.
Helix Core Server users connect to a shared file repository using a client application like P4V. P4V
connects your computer to the Perforce versioning service and helps you move files between the Helix
Server depots and your workspace:
11
Getting started with P4V
n Workspace: folders or directories on your workstation where you work on revisions of files that
are managed by the Helix Core Server.
n Helix Core app: P4V (or another Helix Core application, like the command-line client or P4VS,
the Helix Plugin for Visual Studio), running on your workstation, which makes requests from the
Helix Core Server and delivers the results of those requests (files, status information, and so on)
to you.
n Service: the Perforce versioning service responds to requests from Helix Core applications,
maintains depot files, and tracks the state of workspaces.
n Depot: a file repository hosted by the Perforce service. It contains all existing versions of all files
ever submitted. The Helix Core Server can host multiple depots, but the examples in this guide
show a single depot.
n Connect to a Perforce service (see "Connecting to Helix Server" on the facing page)
n Configure your client workspace (see "Creating and managing workspaces" on page 16)
n Get files from the depot (see "Retrieving files from the depot" on page 61)
n Add files to the depot (see "Adding files to the depot" on page 60)
Note
This feature is available only when you connect to Helix Server version 13.1 or up. The Check for
Updates feature may be disabled by your Helix Server administrator.
12
2 | Using P4V
2 | Using P4V
This chapter describes the tasks you must perform to start working with P4V, along with tips for using the
P4V user interface.
13
Connecting to Helix Server
n If P4V is already running, go to Connection > Open Recent and select the connection.
n When you launch P4V, select the connection from the Connections drop-down in the Open
Connection dialog. The Connections drop-down lists recent and favorite connections.
Note
If your Connection preference is set to Restore all previously opened connections when
you launch P4V, P4V opens the most recently used connection and skips the Open
Connection dialog.
1. Launch P4V or, if P4V is already running, go to Connection > Open Connection.
2. In the Open Connection dialog, enter the Perforce service name and port number for the
connection using server_host:port_number syntax.
If your Perforce service is enabled for SSL (Secure Sockets Layer) encryption, use the following
syntax: ssl:server_host:port_number
Important
If you attempt to connect to an SSL-enabled Perforce service and you see a warning about an
untrusted SSL connection or altered SSL fingerprint, contact your Helix Server administrator
before completing the connection.
Note
If the server you are connecting to is configured with multi-factor authentication (MFA), you are
prompted for another layer of verification. Depending on the setup, you may need to select a
method of verification before you can enter your credentials.
For more information, see p4 login2 in the P4 Command Reference.
14
Favorite connections
Note
You can set Windows environment variables for Perforce connection settings, which makes the
settings available to other Helix Server client applications (for example, P4EXP, the Helix Plugin for
Windows Explorer).
Favorite connections
You can maintain a list of favorite connections and assign descriptive names to the entries. This frees
you from having to remember port numbers and service host names.
n To add a favorite connection, go to Connection > Favorite Connections > Add Favorite
Connection….
n To modify existing favorites, go to Connection > Favorite Connections > Manage
Favorites….
n To connect to a favorite connection, go to Connection > Favorite Connections.
15
Creating and managing workspaces
For full details about configuring client and services to handle Unicode environments and files, refer to the
Internationalization Notes (http://www.perforce.com/perforce/doc.current/user/i18nnotes.txt) for your
version of Helix Server.
Create a workspace
To create a new workspace:
Note
This dialog only appears if P4V is configured to prompt for a new workspace name. This is not
the default behavior.
3. In the Workspace dialog, on the Basic tab, accept or change the default workspace name and
root.
16
Create a workspace
n Select the View workspace mapping as text icon and enter your view specification
using Helix Server client view syntax.
n Select the View workspace mapping as tree icon and browse to the files and folders
you want.
Build your workspace mapping by selecting a depot, folder, or file and using the Include,
Exclude, and Clear icons; or right-click and select include, exclude, and clear options in the
context menu.
For more information about mapping workspaces, see "Defining a Workspace View" on
page 22.
Stream depots:
n Stream: enter or browse for the stream that will be associated with this workspace.
If you enter a stream, the workspace view is populated automatically under Workspace
Mappings; you cannot edit it.
Note
To dissociate a workspace from a stream, delete the entry in the Stream field.
n Stream at change:if you want to work using a stream definition as of a specific changelist,
enter the changelist number here.
When a change is made to a stream definition, the stream is versioned using the current
value of the change counter. Use stream at change when you want your stream workspace
to use a view generated from the stream definition as of a prior changelist.
Using a stream-at-change view is useful if you need to work with a set of directories and
files that are not identical to the set in the current stream. For example, your stream may no
longer include certain libraries that had been included in an early version of the stream, but
now you need those libraries to test a build. Enter the number of the last changelist to
include those libraries. When you work in this workspace, P4V syncs to that changelist,
allowing you to perform the test builds. Stream-at-change workspaces are read-only; you
cannot check files into a previous changelist.
For more information about streams, see the "Streams" chapter in the Helix Core Server
User Guide.
17
Create a workspace
5. Advanced options: You can specify the following settings on the Advanced tab.
Locked If enabled, only the owner of the workspace can use, change, or delete the
workspace specification.
Description Your own explanation of the purpose of the workspace, or any related
information you need to specify.
The Description field accepts HTML tags for marking up and hyperlinking
text. For details, see "Formatting text in Description fields" on page 41.
Host (Optional) The computer where the workspace resides. To enable the
workspace to be used from any machine, leave this field blank.
AltRoots For workspace specifications used from hosts on different platforms, a list of
workspace roots in host-platform-specific syntax.
File n Allwrite: All files in the workspace are writable (can be modified).
Options
n Clobber: Syncing files overwrites writable files on the workspace.
n Compress: Compresses data sent between the workspace and the
Helix Server.
n Modtime: Modification time for files edited in the client workspace is
set to the time when the file is submitted to the depot. With this option,
P4V also minimizes costly digest computations on the client by
checking file modification times before checking digests to determine
if files have been modified outside of P4V.
n Rmdir: Deletes a workspace folder if all the files contained in the
folder are removed.
Line The line-end convention used for storing text files on the workspace
ending computer:
characters
n Local: Uses the workspace platform default
for text
files n Unix: LF
n Mac: CR
n Win: CRLF
n Share: Line endings are LF. Any CR prior to a line ending is removed
for storage or syncing (for disks shared between UNIX and Windows)
18
Create a workspace
On submit Configures what happens when users submit files. The following options are
available:
n Submit all selected files: Default. All open files are submitted.
n Don't submit unchanged files: Files that have content, type, or
resolved changes are submitted, Unchanged files are moved to the
default changelist.
n Revert unchanged files: Files that have content, type, or resolved
changes are submitted. Unchanged files are reverted.
Check out Select to cause submitted files to be reopened in the default changelist.
submitted
files after
submit
Client type Specifies the type of client: writeable (the default), readonly, or
partitioned.
Use readonly for short lived clients used in build automation scripts. Such
clients cannot edit or submit files, but this should not be an issue in build
scripts.
Use partitioned to achieve the same thing as the readonly setting but with
the additional ability to edit and submit files using that client.
Note
Using writeable clients in build automation scripts can lead to db.have
table fragmentation, which is used to track what files a client has synced.
If you are experiencing such issues, use a read-only or partitioned client
instead. A client of type readonly or partitioned is assigned its
own personal db.have database table. The location of this table must
first be specified with the client.readonly.dir configurable by
an administrator.
19
Change your workspace
Backup Not currently in use. Applies only to clients bound to cluster workspace
servers.
If a backup startup process is launched on a cluster workspace-server, by
default all writable clients (see Type field) bound to that workspace-server
are periodically backed up. To disable backup for a particular client, its owner
must set the value of the Backup field to disable. Note: If the backup
startup process is configured with auto-unload unused clients on, neither
readonly clients nor those with backup disabled, will be considered for auto
unload.
For complete information, see version 15.1 of Helix Core Server
Administrator Guide: Cluster Management.
6. Click Save to save your entries and create the workspace specification.
n In the drop-down menu at the top of the Tree pane, click the drop-down arrow and select Switch to
Workspace.
n Go to Connections > Switch to Workspace.
n Open the Open Connection dialog and click Browse next to the Workspace field.
You can also switch your workspace by right-clicking a workspace in the Workspaces tab and selecting
Switch to Workspace <workspace name>.
Stream depots:
You can switch stream workspaces using the same methods as you use for classic workspaces. In
addition, you can switch stream workpaces by doing the following:
In both cases, a warning dialog pops us and asks you to switch workspaces or create a new one. Click
the Switch Workspaces button to switch your workspace. If more than one workspace is associated
with the stream, the Select Workspace dialog opens, where you can search for and select the
workspace you want.
However, if you have set your stream operations preference in the Preferences dialog to use the same
workspace when you switch between streams, then P4V does not prompt you to switch workspaces.
Instead the workspace view changes to include the stream you are switching to. In other words, the
Stream field value in the workspace definition changes to the new stream. No matter what your stream
operations preference, this is always the behavior in the Streams graph when you drag the Workspace
icon from your current stream to the one you want to work in.
20
View workspaces
View workspaces
To view workspaces for the server to which you are connected, do either of the following:
1. Go to View > Workspaces or select the Workspace icon in the toolbar to open the
Workspaces tab.
Double-click a workspace row to display the details of the client workspace specification.
2. Open the Select Workspace dialog.
Double-click a workspace row to display the details of the client workspace specification.
You can also choose to Show only workspaces available for use on this computer.
For more information on filters, see "Searching and filtering" on page 34.
1. Submit or revert any pending or shelved changelists associated with the workspace.
2. Go to View > Workspaces or select the Workspace icon in the toolbar to open the
Workspaces tab.
3. Right-click the workspace and select Delete Workspace 'workspace_name'.
Unloading transfers infrequently-used metadata from the versioning engine’s database files to a set of flat
files in an unload depot. If you unload a workspace, you can reload it if you change your mind and want to
use it again.
To unload a workspace:
1. Submit or revert any pending or shelved changelists associated with the workspace.
2. Go to View > Workspaces or select the Workspace icon in the toolbar to open the
21
Defining a Workspace View
Workspaces tab.
3. Right-click the workspace and select Unload Workspace 'workspace_name''.
1. Go to View > Workspaces or select the Workspace icon in the toolbar to open the
Workspaces tab.
2. Select the Unloaded icon in the filter pane to open the Unloaded Workspaces dialog, where
you can filter for and select unloaded workspaces to reload.
3. Right-click the workspace and select Reload Workspace 'workspace_name'.
Click the View workspace mapping as text icon and type your view specification using Helix
Server client view syntax. Views consist of mappings, one per line. The left-hand side of the mapping
specifies the depot files and the right-hand side specifies the location in the workspace where the depot
files reside when they are retrieved from the depot. Example:
//depot/... //bruno/depot/...
//user_depot/... //bruno/user_depot/...
//projects/... //bruno/myprojects/...
For details about client view syntax, see the Helix Core Server User Guide.
22
Navigating P4V
Click the View workspace mapping as tree icon . The depot is displayed as a tree of folders and
files. Right-click the file or folder you want to map and choose the mapping, as follows:
n Include tree/Exclude tree: Include or exclude all files below the selected folder.
n Include file/Exclude file: Include or exclude a specific file.
n Include Special/Exclude Special: Use depot syntax to specify the workspace view.
n Clear:
Alternately, double-click files or folders and use the resulting Special Edit dialog to define the view. This
dialog enables you to specify options by clicking radio buttons or using the Expressions field to enter the
left and right-hand components of a client view mapping.
To remove mapped folders or files from the mapping, right-click the respective folder or file and select
Clear.
Tip
To quickly add a depot path to the client view, go to View > Filter Depot > Entire Depot Tree, right-
click the desired path and choose Map to Workspace View.
Navigating P4V
This section helps you get familiar with P4V terminology and layout and walks you through basic tasks
such as updating status information, modifying views, and accessing administration tools.
Terminology
P4V menus and forms use a general approach to versioning terminology and actions, to ensure that that
users with a variety of backgrounds can best understand what to do. If you have experience with P4Win
or the P4 command line, note the following differences in terminology in P4V.
23
Layout
Layout
P4V displays one main window with two panes: the left pane, which is also called the Tree pane, and the
right pane, which is where you do most of your work in P4V. These panes, as well as the other parts of
P4V are described in detail below.
n Toolbar and tooltips: Across the top of the screen, there is a toolbar.
To get information about the items in the toolbar, as well as other Helix Server objects and P4V
button, position the mouse cursor over the object without clicking. P4V displays a small window
(tooltip) containing status or explanatory information about the object. P4V makes extensive use
of tooltips.
n Address bar: this field, which is displayed under the toolbar, enables you to navigate to specific
folders and files in the depot and in your workspace.
You can copy from and paste into the address bar.
n Log pane: The log pane, which displays the commands issued by P4V, is a tab located at the
bottom of the P4V window.
To display this pane, choose View > Log Pane.
n Dashboard pane: The dashboard displays a variety of details about the status of your workspace
and provides quick links for common tasks.
The dashboard is a tab located at the bottom of the P4V screen. To display the dashboard, choose
View > Dashboard. To configure the tasks displayed in the dashboard, click the Settings button
that is displayed at the top right corner of the tab.
n Context menu: To display the context menu for an object on a Mac, option-click or click and hold.
On Linux and Windows, right-click. (Note that this help system uses the platform-independent
terminology "right-click" when instructing you to display a context menu.)
The left pane has two tabs: the Workspace tab shows the files on your computer, including files that are
not in the depot. The Depot tab shows all of the files in the depot. To view the contents of a folder in the
right-hand pane, click on that folder, and select View > Files in Folder.
The right pane contains tabs for working with changelists, labels, workspaces, users, jobs, streams, and
branches. To display a tab, click the corresponding button on the toolbar or choose it from the View
menu. At the bottom of the right pane, the Details tab displays details about the current selected object.
To view multiple Details tabs (for example, to compare two objects), choose View > Tear Off.
24
Modify views
Modify views
There are several ways to modify the way that information is presented in P4V’s panes and tabs. At the
top of these panes and tabs, you can see one or more of the following buttons:
Bookmarks
Bookmarks act like shortcuts to locations in the tree. Set a bookmark by right-clicking on a directory and
selecting Bookmark. You can then use this dropdown link to go to that location.
For more information, see "Bookmarking files" on page 30.
Sort order
Use this drop-down button to sort the order of the list that you are viewing. The sort options are shown
when you click the button.
Filter
This drop-down button allows you to filter your view in the following ways:
n Show or hide different types of files, such as deleted files and/or local files.
n Search for files and specs by various criteria and save those filters for reuse.
n In the Tree pane, "re-anchor" your tree to the bookmarks that you have created. If you select a
bookmark from this list, that bookmark location becomes the top of your tree view.
For more information about filters, see "Searching and filtering" on page 34.
Tear Off
This button allows you to "tear off" the current view. This is useful for comparing two different forms side-
by-side. Once you have torn off a view, you can close the tear-off by simply closing that window.
25
Using access keys and shortcut keys
Within a menu, you only need to press the <key> key. For example, to switch to the Depot Tree:
In addition, shortcut keys allow more experienced users to quickly perform select actions. For example:
Where applicable, P4V displays shortcut keys to the right of a menu label.
The following table lists common shortcut keys.
26
About P4V icons
27
About P4V icons
28
About P4V icons
Symbolic link
Depots Spec depot: when enabled by your Helix Server administrator, a spec
depot stores the history of changes to Helix Server specifications such
as changelists.
29
Bookmarking files
Bookmarking files
P4V enables you to create bookmarks so you can navigate quickly to often-used files and folders. You
can organize the bookmarks using folders and separators. When you choose the bookmark from the list
displayed under the Tools > Bookmarks menu item, P4V navigates to the corresponding file or folder
and selects it, expanding any containing folders.
30
Manage bookmarks
Manage bookmarks
1. Go to Tools > Bookmarks > Manage Bookmarks…
2. On the Manage Bookmarks dialog, you can create and edit bookmarks, create folders, and
create separators.
Display pending +1 +1
changelists
Display submitted +2 +2
changelists
Display branches +3 +3
Display labels +4 +4
Display +5 +5
workspaces
Display jobs +6 +5
Find +F +F
31
Using P4V shortcuts
Go to a +G +G
specification
Display Helix +I +I
Server versioning
service information
in log window
Lock files +L +L
Create new +N +N
specification
Open a new +O +O
connection
Revert selected +R +R
files
Submit selected +S +S
changelist
Display revision +T +T
history of selected
file/folder
32
Drag and drop
Paste text +V +V
Cut text +X +X
n To add a file to Perforce, drag it from a file browser (such as Windows Explorer) to a pending
changelist.
n To get a file revision at a submitted changelist, workspace, label or file revision, open the Get
Revision dialog and then drag the submitted changelist, workspace, label or file revision to the
text field on the right of the Specify revision using: option.
n To integrate (merge) files, drag the source folder to the target folder. The Merge/Integrate dialog
opens, where you can refine your integration criteria.
n To label a file, drag a file or a folder to a label. Alternately, drag a label onto a file or folder.
n To diff two file revisions, drop a file or a file revision onto another file revision. To display file
revisions, right-click the file and choose File History.
n To diff revisions of different files, display the File History for both files, then drag a revision
from one window to the other and drop it on the other revision.
n To diff two folder revisions, drop a folder revision onto another folder revision. To display folder
revisions, right-click the folder and choose Folder History.
n To add files to a pending changelist, drop files onto the pending changelist itself, or onto the
Files field of the pending changelist’s Submit form.
n To move a file from one changelist to another, drag files from the source Submit form to the
target Submit form. Alternately, choose Display>Pending Changelists, and drag the files from
the source changelist to the target changelist.
n To filter the pending changelists, submitted changelists, labels, or jobs by file path, drag
files or folders from the Tree pane to the Filters pane in the respective tab.
33
Searching and filtering
n To add a job to a changelist, drag the job from the Jobs tab of the right pane to the Jobs field of
the pending changelist. You cannot attach a job to a submitted changelist.
n To locate a file in the depot, drag the file from a pending or submitted changelist to the address
bar (which is located below the P4V toolbar). Alternatively, copy the depot or workspace path (for
example, select a file in a submitted changelist and choose Edit>Copy), then paste the path into
the depot or workspace pane.
n To switch panes, drag any selected object to the toolbar button for the desired pane. For
example, to add a job to a submitted changelist, drag the job from the Jobs tab to the submitted
changelists button P4V displays the Submitted Changelist tab. Drop the job on the target
changelist.
n For streams drag-and-drop shortcuts, see "Using the stream graph" on page 127.
34
Find a file, folder, or item in the active tab
Note
Some fields may not be visible unless you expand the filter pane manually.
1. Click the Filter disclosure triangle in the upper pane of the specification (Submitted,
Jobs, Labels, etc) tab.
2. Enter your filter criteria in the appropriate fields.
Use the following buttons to add or delete filter rows:
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:
35
Customize Depot and Workspace views using filters
Option Description
Depot tree Show Deleted Depot Select to display files that have been deleted from
Files the depot at head revision
Hide Deleted Depot Select to hide files that have been deleted from the
Files depot at head revision
Tree Restricted to Click to open the list of depot types, and then
Depot Type select the depot type to display
Workspace Show Files Not in Select to display files that only exist in the
tree Depot workspace, not in the depot
Hide Files Not in Select to not display files that do not exist in the
Depot depot
Show Only Files Not Select to display only files that do not exist in the
in Depot depot
36
Save and reuse filters
n In the filter pane, click the Apply saved filters icon and select Save Filter…
n Go to the Search menu and select Save <spec type> Filter…
2. On the Add Filterdialog, enter a name and folder location for your saved filter.
3. Click OK to save.
1. In the filter pane, click the Apply saved filters icon or go to th e Search menu and select the
filter type that you want.
2. Select a filter from the list.
n In the filter pane, click the Apply saved filters icon and select Manage Filters….
n Go to the Search menu and select Manage <spec type> Filters….
2. On the Manage Filtersdialog, organize your saved filters by adding, deleting, or moving filters and
folders.
3. 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….
37
Reconciling offline work
n Drag and drop a file path from the Depot or Workspace tree into the field.
n Click the drop-down arrow to view and select recent file paths.
1. Click the Construct a file path icon to open the File Path Builder.
2. Build a file path by selecting any one or combination of the following criteria:
n Folder path in the depot or workspace.
Click Browse to view the depot and workspace trees and select a path.
n File name or partial filename, using contains, is, ends with, or starts with.
n Revision range:
l All revisions.
l Revisions starting or ending at a particular revision number, changelist number, label,
workspace, or date/time.
l 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.
3. 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.
Note
To speed up reconcile operations, you can set the Modtime option for the workspace. For details, see
"Create a workspace" on page 16.
To bring the Helix Server depot up to date with the work you did offline:
1. Right-click the folder that contains the files that you have edited, added, or deleted, and select
Reconcile Offline Work.
38
Exporting files
2. If there are files that need to be reconciled, the Reconcile Offline Work dialog appears.
P4V compares your workspace to the depot and lists the following in the dialog:
n Files that were modified locally without being checked out. Select the files that you want to
check out so that you can submit your changes.
n Local files that are not in the depot. Select the files that you want to mark for add.
n Depot files that are missing from your local workspace. Select the files that you want to
mark for delete.
For renamed files, you must integrate the original file to the new filename and delete the
original file. If you have altered the directory structure of your workspace, you might need to
adjust your workspace view. For more information, see "Renaming and moving files or
folders" on page 71 and "Defining a Workspace View" on page 22.
3. In the Reconcile Offline Work dialog, do the following:
a. (Optional) Use the filter pane to limit the list of files displayed:
Select Match criteria:
n All retrieves results that meet all of the conditions you enter; 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.
n Any retrieves results that meet any of the conditions you enter; 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.
Use the following buttons to add or delete filter rows:
Exporting files
You can export files outside the current workspace mapping or if you have not set up or selected a
workspace. For files mapped to a workspace, this option is not available.
Note
Exporting files may result in unexpected behavior. For example, if a file name contains spaces, P4V
replaces them with underscores.
39
Exporting files
To export files:
40
Formatting text in Description fields
In edit mode, P4V supports internal and external drag-and-drop, cut and paste, and undo/redo operations
in the Description fields of what is generally referred to as specs, such as job specs, workspace specs,
stream specs, branch specs, and so on. In addition, you can use HTML syntax to mark up text and
create hyperlinks.
In read mode, the content of Description fields renders in rich text; hyperlinks are active and, when
clicked, open up in the default web browser. The following figure illustrates how the content of the
Description field renders in edit versus read mode.
Note
For submitted changelists, edit mode is only available if you have a workspace and if the changelist is
yours.
The supported HTML tags in Description fields are governed by Qt's rich text engine. For details, see
Qt's documentation on the supported HTML subset.
41
3 | Configuring P4V
This chapter describes how to configure your P4V and user preferences locally within P4V:
Note
Performance and feature-related properties set centrally or globally override local P4V settings. Some
properties can only be set on the server level.
For information on using P4V with Swarm, see "Integration with Swarm" on page 153. For more details on
setting up the integration, done by an admin user on the Helix Server, see Swarm integration properties
in the Helix Core Server Administrator Guide: Fundamentals.
To view settings currently in effect, see "Viewing effective settings" on page 59.
Connections 43
Streams 44
Server Data 45
Behavior 46
Double-click 52
Shortcuts 52
Logging 52
Display 53
Files and History 53
42
Connections
Features 54
Tools 54
File Editors 55
Diff 56
Merge 56
Applets 57
2. Click Apply to save your changes or click OK to save your changes and exit the dialog.
Note
Local versus centralized preferences: Many P4V preferences can be defined or disabled centrally
using the Perforce service. For example, an administrator can disable the Labels tab centrally, and
you cannot override this setting in your local P4V preferences to make the Labels tab available.
These centralized settings are specific to a Perforce service, so if you switch your connection to a
different Perforce service during a P4V session, you may see different behaviors after you open the
new connection. For example, if Perforce service A has enabled the Labels tab and Perforce service
B has disabled it, the Labels tab will become unavailable when you switch your connection from
service A to service B.
Note also that there are performance-related preferences (such as those on the Server Data page)
that you can set centrally using the Perforce service. If these centrally-set performance preferences
differ from your local preferences, your local settings continue to appear in the Preferences dialog
even though the central preferences are overriding them.
Connections
You can configure the following settings for connecting to Perforce services:
When the application launches:
n Show the Perforce Connection dialog: Always prompt for connection settings when launching
P4V.
n Restore all previously opened connections: Do not prompt for connection settings; reconnect
to the Perforce service to which you were connected during your last session.
n Use IP-specific tickets when logging in: Specifies whether your login ticket is restricted to the
IP address from which you are connecting.
n Automatically log off when closing a connection: Specifies whether your ticket is invalidated
when you log out.
n Don’t expand Workspace and Depot trees to their previous state when opening
connections: Specifies whether the trees are initially displayed expanded only at the top (depot)
level.
43
Streams
Streams
You can configure the way P4V handles operations such as branching and reparenting streams:
n When branching streams, include file deletion actions (Server 12.1 or later): Select to
include files that were deleted from the parent stream when P4V populates the child stream.
Equivalent to p4 populate -f command. The default behavior is to skip deleted files when
branching to a new stream.
n Don’t allow streams to be reparented with drag and drop in the stream graph: Disables
drag and drop of streams inside the P4V stream graph. This is helpful if you find yourself
accidentally reparenting streams while working within the stream graph.
n Do not warn when checking out, adding, or deleting imported files: Specifies the default
behavior when operating on files that are imported into the current stream from another location.
Choose act on imported files to have the files marked for edit, add, or delete as appropriate.
Choose ignore action for imported files to have the file operations quietly ignored.
You can configure the way P4V handles workspaces when you perform stream operations with the
following:
n When clicking 'Work in this Stream': Select use different workspace to have P4V prompt to
create a new workspace for the selected stream if needs be. Select reuse current workspace to
have P4V automatically switch your current workspace to the selected stream. Select this option
if you regularly use streams with nearly identical workspace views and do not want to re-sync
(retrieve) large amounts of redundant content each time you switch streams.
n When dragging workspace icon to a new stream: Select use different workspace to have
P4V prompt to create a new workspace for the selected stream if needs be. Select reuse current
workspace to have P4V automatically switch your current workspace to the selected stream.
Select this option if you regularly use streams with nearly identical workspace views and do not
want to re-sync (retrieve) large amounts of redundant content each time you switch streams.
n Don’t warn me when switching workspaces: Specifies whether P4V switches workspaces
silently when you switch streams.
n Update workspace files on stream switch: Select one of the following options:
l Prompt to update workspace files to have P4V ask for confirmation when you reuse a
workspace with a different stream.
l Automatically update workspace with all stream files to have P4V overwrite workspace
files without waiting for confirmation.
l Never update workspace files to keep workspace files unchanged when you switch to a
different stream.
You can control the display properties of the stream graph with the following:
n Show pending stream-to-stream merge and copy hints: Enable to show which streams have
changes to copy or merge. When disabled pending stream-to-parent merge and copy hints can be
44
Server Data
displayed by refreshing individual streams. Disabling this option reduces the amount of data P4V
needs to request from the server.
Server Data
You can configure how much data P4V processes during a session to minimize server load for frequently-
run commands and large data transfers. The following settings are available:
n Check server for updates every n minutes: Specifies how often P4V checks the Perforce
service for updated file information. Frequent checks enable P4V to display current file status but
increase the workload on the Perforce service.
n Maximum number of files displayed per changelist: Specifies the maximum number of files
displayed in a changelist, to help minimize the time required to handle and submit very large
changelists. This setting affects only the display of changelists and does not limit the number of
files that a changelist can contain. Any files beyond the maximum number are displayed as a plain
text list.
n Maximum size of file to preview (excludes audio and video files): Limits the size of image
files displayed in the Preview tab on the Files pane, to limit the amount of image data sent from the
Perforce service to P4V.
n Number of changelists, jobs, branch mappings or labels to fetch at a time: Specifies the
number of specifications read in each batch fetched, to minimize server load and maximize P4V
performance. To retrieve all entries, specify 0.
n Maximum number of files to display in Dashboard Workspace Folder View: Limits the
number of files displayed in the Dashboard view.
n Disable parallel sync: Disables concurrent transfer of files for all P4V connections. There is no
configuration in P4V to turn on parallel sync; instead, parallel sync is enabled automatically when
the net.parallel.threads config parameter is set in a server (2014.1 or later). Parallel
sync can greatly reduce the amount of time it takes to update a workspace, especially when
connecting across a high latency network. For more information on parallel processing, see Using
parallel processing for submits and syncs in Helix Core Server Administrator
Guide: Fundamentals.
n Disable parallel submit: Disables concurrent transfer of files when submitting to a 2015.1 or
later server. Similar to parallel sync, parallel submit can greatly reduce the amount of time required
to submit by transferring multiple files across the network at the same time. For information on the
server configurables pertaining to parallel submit, see net.parallel.submit.threads
and net.parallel.max in the P4 Command Reference. Parallel transfer mode only kicks in
if you set net.parallel.max to a value larger than 0.
n Disable parallel shelve: Disables file transfer in parallel mode. Parallel shelving is enabled when
the net.parallel.shelve.threads config parameter is set in a server (2017.2 or later).
By default, this setting is turned on. For more information on the server configurable, see
net.parallel.shelve.threads in the P4 Command Reference.
45
Behavior
n Automatic Safe Resolve (no merging) when syncing files: Automatically resolves
differences when getting a file revision by either accepting the target file or the source file,
depending on which file has changes. By default, this setting is turned on. When turned off, P4V
opens the Resolve dialog instead to let you decide how to resolve differences.
Behavior
You can configure the following general P4V user interface behaviors.
Prompts:
n Warn before reverting files: Specifies whether P4V displays a prompt before reverting files.
n Warn when ignored files are not marked for add: Select to view a warning when you attempt
to mark a file in your workspace for add and it is included in an ignore list.
If you have created ignore lists and set the ignore list file name as the local P4IGNORE
environment variable, P4V will not mark the files and file types listed in those ignore lists for add.
The warning appears when you attempt to mark such a file for add or use the Reconcile process to
add the file to the Helix Server depot.
For more information about ignore lists and P4IGNORE, see the P4 User Guide.
n Prompt for changelist when checking out, adding, or deleting files: Specifies whether P4V
displays the Choose changelist dialog when you open files.
n Prompt to get latest revision when checking out files that are out of date: Specifies whether
P4V displays a prompt to get the latest revision when you attempt to check out files from an
earlier revision.
n Update files when modifying workspace mappings: Select one of the following options:
l Prompt to update workspace files to have P4V ask for confirmation when modified
workspace mappings affect the files in your workspace.
l Automatically update workspace to have P4V overwrite workspace files without asking
for confirmation.
l Never update workspace files to keep workspace files unchanged when you modify
workspace mappings.
n Prompt for name when creating new workspace: Specifies whether P4V displays the
Workspace Name dialog when you create a new workspace. By default, this prompt is turned off.
Note
If this feature is turned on on the server side, selecting or clearing this check box has no effect.
You cannot override server-side configurations.
46
Behavior
n Warn before checking out files, if the number of files exceeds <xxx>: Select to receive a
warning when checking out a large number of files. The default limit is 1000 files.
Note
Selecting this option may cause performance issues.
Merge-Integrate
You can configure default behaviors for the Merge-Integrate dialog.
n Specify the default merge method that appears when the dialog opens:
l Specify source and target files: The dialog prompts you to select source and target files
l Branch mapping: The dialog prompts you to select a branch mapping
l Remember my last choice: The dialog opens with the merge method you used the last
time you opened the dialog
You can set different default merge methods depending on whether you open the
Merge/Integrate dialog from a file or folder (non-stream) or a submitted changelist.
Note
You cannot set the merge method that appears by default when you open the
Merge/Integrate dialog from a stream object or branch mapping, since the merge method
for a stream object is always Stream-to-stream and the merge method for a branch
mapping is always Branch mapping.
n Specify how to treat the files that you use to filter a branch mapping:
l Source: The files that you include are treated as the source
l Target: The files that you include are treated as the target
l Remember my last choice: The dialog treats the files the way it did the last time you
opened the dialog
47
Behavior
n Specify which Options tab appears on top when the Merge/Integrate dialog opens:
l Resolve and Submit
l Filter
l Advanced
l Remember my last choice
n Specify the default Resolve and Submit options:
l Add files to pending changelist or Automatically submit after resolving
l Automatically resolve files after merging (select one of the resolve methods)
l Pending changelist: Default or new
l Add previously linked job(s) to the new changelist
n Specify whether to Check for opened files and warn prior to merging.
This option checks to see if any of the files selected for merging are open for other actions.
Click Restore Defaults to change the settings back to the P4V defaults.
For more information about these options, see Merging Files Between Codelines.
Integrate Flags
Integrate flags can be applied when the Merge/Integrate and Branch dialogs run the p4 integrate
command. You can configure these integrate flags to be applied by default.
n Do not copy newly branched target files to workspace (-v): Create a branch in the depot
without retrieving the corresponding files from the depot to your workspace.
n Schedule 'branch resolves' instead of branching new target files (-Rb): Schedules a branch
resolve, instead of branching new target files automatically.
n Schedule 'delete resolves' instead of deleting target files (-Rd): Schedules a delete resolve,
instead of deleting target files automatically.
Warning
The following integration flags can have unexpected or undesired results. Do not select them if you
are not certain you want these actions to be applied.
n Try to integrate changes when source deleted and re-added (-Di): If the target file has been
deleted and the source file has been changed, this option re-branches the source file on top of the
target file. If the source file has been deleted and the target file has changed, this option deletes
the target file. By default, outstanding edits cannot be integrated with a deleted file.
n Force integration on all revisions, disregarding integration history (-f): Integrate all
revisions of source and target files, including revisions that have already been integrated.
Typically used with a specified revision range.
48
Behavior
n Do not get latest revision of selected files (-h): Use the workspace revision of the target file.
By default, the head revision of the target file is automatically retrieved into the workspace before
integrating.
n Disregard indirect integration history (-1): Restrict selection of the base file revision to direct
(parent-to-child or child-to-parent) integration history.
n Propagate source filetypes to target files (-t): Assign the target file the same file type as the
source file (when integrating to existing target files).
n Skip previously merged 'cherry-picked' revisions to improve merge results (-Rs): Skips
cherry-picked revisions that have already been integrated. This option can improve merge results,
but can also require multiple resolves per file.
These integrate flags are applied with different P4 commands, depending on the dialog, integration
method, and Helix Server (P4D) version:
For more information about these P4 commands, see the P4 Command Reference.
Copy
You can configure default behaviors for the Copy dialog.
n Specify the default copy method that appears when the dialog opens:
l Specify source and target files: The dialog prompts you to select source and target files
l Branch mapping: The dialog prompts you to select a branch mapping
49
Behavior
l Remember my last choice: The dialog opens with the copy method you used the last time
you opened the dialog
You can set different default copy methods depending on whether you open the Copy dialog
from a non-stream file or folder or a submitted changelist.
Note
You cannot set the copy method that appears by default when you open the Copy dialog
from a stream object or branch mapping, since the copy method for a stream object is
always Stream-to-stream and the copy method for a branch mapping is always Branch
mapping.
n Specify how to treat the files that you use to filter a branch mapping:
l Source: The files that you include are treated as the source
l Target: The files that you include are treated as the target
l Remember my last choice: The dialog treats the files the way it did the last time you
opened the dialog
n Specify which Options tab appears on top when the Copy dialog opens:
l Submit
l Filter
l Advanced
l Remember my last choice
n Specify the default Submit options:
l Add files to pending changelist or Automatically submit copied files
l Pending changelist: Default or new
l Add previously linked job(s) to the new changelist
n Specify the default Advanced option:
l Do not copy newly branched target files to workspace (-v): Create a branch in the depot
without retrieving the corresponding files from the depot to your workspace.
Branch
You can configure default behaviors for the Branch dialog.
50
Behavior
n Specify the default branch method that appears when the dialog opens:
l Specify source and target files: The dialog prompts you to select source and target files
l Branch mapping: The dialog prompts you to select a branch mapping
l Remember my last choice: The dialog opens with the branch method you used the last
time you opened the dialog
You can set different default branch methods depending on whether you open the Branch
dialog from a non-stream file or folder or a submitted changelist.
Note
You cannot set the branch method that appears by default when you open the Branch
dialog from a stream object or branch mapping, since the branch method for a stream
object is always Specify source and target files and the branch method for a branch
mapping is always Branch mapping.
n Specify how to treat the files that you use to filter a branch mapping:
l Source: The files that you include are treated as the source
l Target: The files that you include are treated as the target
l Remember my last choice: The dialog treats the files the way it did the last time you
opened the dialog
n Specify which Options tab appears on top when the Branch dialog opens:
l Submit
l Filter
l Advanced
l Remember my last choice
n Specify the default Submit options:
l Add files to pending changelist or Automatically submit branched files
l Pending changelist: Default or new
n Specify the default Advanced option:
l Do not copy newly branched target files to workspace (-v): Create a branch in the depot
without retrieving the corresponding files from the depot to your workspace.
51
Double-click
Double-click
You can select what you want to happen when you double-click various object types in P4V. Select a
double-click behavior for an object by clicking in the Double Click Behavior column to open a drop-
down list. The behaviors available for selection in the drop-down list depend on the object.
Click Restore Defaultsto return all objects to their default setting, which is always the first selection in
each drop-down list.
Shortcuts
You can enter keyboard shortcuts for commands used in the main P4V window, Revision Graph viewer,
Folder Diff utility, and Time Lapse View.
To enter or edit a shortcut:
Some commands come with default keyboard shortcuts. You can restore all defaults by clicking Restore
Defaults, or set an individual command to use a default by selecting the command row and clicking Use
Default.
Logging
You can configure the following logging options:
Log pane options:
n Show p4 reporting commands: Specifies whether the log pane in the P4V window displays all
commands issued by P4V, including commands issued by P4V to obtain status information from
the Perforce service.
n Show p4 command output for file operations: For verbose log messages, enable this option.
Logging to a file:
52
Display
Display
You can configure the following P4V display and localization options:
Application:
n Show item count on tab bar of details pane: For the Submitted tab, toggles display of the
number of files and job fixes in the tab bar of the details pane (below the Submitted list).
n Show the What’s New in P4V page after upgrading: Display the What’s New page as a tab in
the P4V window.
n Dates: Sets the date format used throughout P4V:
l OS format: Use the format that your operating system uses.
l Perforce standard (yyyy/mm/dd hh:mm:ss)
n Show date and time as: Specify whether to show the date and time for the shared versioning
service (Server time) or for your local client.
Localization:
n Language used for application menus, labels, and dialogs (requires restart): Select English
or, if it is available, Japanese.
n Set encoding for all connections to: Sets the character encoding for connections to unicode-
mode Perforce services.
If you do not set the encoding here, you are prompted to enter the character encoding every time
you set up a connection to a unicode-mode Perforce service. The encoding that you set here does
not affect service connections whose character encoding has already been set at connection. If
you are unsure which setting to choose, consult your Helix Server administrator.
n Use the system character encoding in P4Merge when connected to non-unicode servers:
When enabled, overrides P4Merge’s logic for determining character encoding (to preserve pre-
2010.1 behavior).
n Use a distinct file icon for modified files: Specifies whether P4V indicates files that you have
edited after syncing them to your workspace (on by default).
n Show Perforce filetype for files in the Workspace and Depot tree: Toggles display of filetype
in the tree panes.
53
Features
n Show revision information for files in the Workspace and Depot tree: Toggles display of
revision numbers in the tree panes.
n Render thumbnails for Maya files: Enables P4V to display thumbnail images of Maya media
files.
n Hide files/revisions from 'task' streams (when following branch, copy actions): Filters out
file revisions that were submitted to task streams when you view file history
n Show changelists integrated into the specified folder (-i): Includes integrations with folder
history.
Features
You can enable or disable the following features. When you disable a feature, the tabs and dialogs
associated with the feature no longer display in P4V.
Features:
n Labels
n Jobs
n Streams
n Unload/Reload
n Distributed Version Control
Menu options:
All of the above are enabled by default. You must restart P4V for changes to take effect. For information
about these features, see the appropriate section of this user guide.
Tools
You can configure the following Revision Graph and Time-Lapse View options:
Revision Graph:
54
File Editors
n Limit Revision Graph to ancestors and descendants: Limits a file’s integration history to
ancestors and descendants (default). This option has the smallest footprint and ensures optimized
performance.
n Show Full Revision history in Revision Graph: Displays the full integration history of the
branch. With this option, the revision graph might take longer to display.
Time-Lapse View:
n By default Time-lapse view should show: Specifies whether Time-lapse View displays only
direct file history, branch (integration/merge) history, or information about the originating
changelist for the selected file by default.
You can also select these display preferences in Time-lapse View. For more information about
these options, see Viewing Image File History with Time-lapse View. For more Image Time-lapse
preferences, see "Image Timelapse" below.
Image Timelapse
Default revisions to retrieve for Image Time-lapse View: Specifies whether you want P4V to prompt
you for the number of revisions to view when you use Time-lapse View, whether to limit the retrieved
revisions to a certain number, or whether to view all revisions. You can improve performance by limiting
the number of large image files retrieved at a time.
Image Time-lapse View Filetype Associations: Specifies whether you want to open files as images in
Time-lapse view, and which image types to view as images. You can improve performance by limiting
image rendering in Time-lapse view.
File Editors
To associate file types with the applications you use to edit them:
1. Click Add.
2. Select a file extension from the drop-down list.
3. Enter or browse for the associated application.
4. (Optional) Select Always use the selected application to open files of this typeto set the
application as the default.
5. Click Save.
You can enter as many applications as you like for each extension. All of the applications will appear as
options when you right-click a file in P4V and select Open With.
Note
Any application that you’ve used to open a file from the context menu in P4V appears by default as an
associated application on the File Editors page in the Preferences dialog, unless you remove it.
55
Diff
Diff
To set the default diff application, select one of the following:
1. Click Add.
2. Select a file extension from the drop-down list.
3. Enter or browse for the associated application.
4. Specify arguments for third-party diff applications in the Arguments field:
Enter %1 for the name of the first file and %2 for the name of the second file. P4V replaces these
placeholders with the actual filenames when calling the diff application.
5. Click Save.
The extension and associated application are displayed in the list of file type-application
associations.
Merge
To set the default merge application, select one of the following:
1. Click Add.
2. Select a file extension from the drop-down list.
56
Applets
Applets
Your administrator can enable a Helix Server server to serve applets that can run in P4V. In order for
these applets to run in P4V, you must enable applets in your P4V preferences. For more information
about Perforce applets, see the Perforce Javascript API for Visual Tools User Guide or consult your
Helix Server administrator.
To enable Perforce applets to run in P4V:
57
Editing user preferences
n Full Name: Enter your full name as you want it to appear to other users.
n Email: enter the email address where you want to receive P4V notifications.
n Job view:enter the jobs that you want to appear automatically on all new changelists that you
submit.
Use standard Helix Server filter expressions to specify the jobs. If you set the Job view field to
any valid filter expression, jobs matching the Job view appear on any changelists you create. Jobs
that are fixed by the changelist should be left in the changelist when you submit it; other jobs
should be deleted from the changelist form before submission. For example, suppose the jobs at
your site have a field called Owned-By. If you set the Job view field to Owned-By=yourname
status=open, all open jobs owned by you appear on all changelists you create. For more
information about how to use Helix Server filter expressions to retrieve jobs, see "Managing jobs"
on page 102.
n Reviews: enter the files whose changes you want to review.
If your Helix Server administrator has activated the Helix Server change review daemon, the
daemon will send you email notifications whenever files you have subscribed to in the Reviews
field have changed. List files using depot syntax. For example, let’s say you enter the following in
the Reviews field:
//depot/main/...
//depot/.../README
The change review daemon sends you an email whenever any README file has been submitted
and whenever any file under //depot/main has been submitted.
You can type depot paths directly in this field or use the Reviews tab to select depot paths
interactively.
58
Viewing effective settings
Application:
P4V version: Helix Visual Client/NTX64/2017.2/1532340
Qt build library: 5.6.1
Qt runtime library: 5.6.1
Disabled features: Dashboard, UnloadReload, Jobs
Server refresh interval: 5 minute(s)
Maximum files displayed per changelists: 1000
Maximum file preview size: 100 k-byte(s)
Entries fetched at a time: 100
If the text pushed from the server occurs, this indicates that settings have been set using the
p4 property command and are being read from the central properties table.
You can also set properties from the command line using the p4 property command. For example:
59
4 | Managing files
This chapter describes how to manage files using P4V.
If the file does not reside in the depot, its icon is unmarked ( ).
60
Retrieving files from the depot
The file icon displays a red plus sign ( ) indicating that it is open for add.
4. To submit the changelist containing the open file, right-click the file and choose Submit.
The Pending Changelist form is displayed, listing the files in the changelist.
5. Enter a description of the change and click Submit.
The new file is added to the depot.
Note
If you do not see the local file in the Workspace tab, choose Search > Filter Workspace > Show
Files Not In Depot.
Tip
To get a revision into your workspace even if the workspace already has the file, in the Get Revision
dialog, select Force Operation. This option does not affect open files.
61
Editing files
Editing files
To edit a file:
1. In the Tree pane, find the file that you want to edit.
For details, see Retrieving Files from the Depot.
2. Right-click the file and choose Check Out.
When you open the file for edit, it is placed in a changelist.
3. Using the editor associated with the file type, make your changes.
To launch the associated editor, double-click the file or right-click and choose Open With. (You
might need to associate an editor with the file type.
To define an editor: choose Tools > Preferences, click the Editor tab, and specify the desired
editor for the file type.)
4. To place your revised version in the depot so other users can have access to it, right-click the file
and choose Submit.
In the Pending Changelist dialog, enter a description of your changes and submit the changelist
that contains the file.
To display a file without opening it for edit, double-click the file icon.
Reverting files
You can discard changes made to open files, reverting them to the revisions last synced from the depot.
Reverting files also removes the reverted files from the pending changelist with which they are
associated.
When you revert files that you:
Note
Reverting a file that has been opened for edit will overwrite any changes you have made to the file
since the file was opened.
To revert files:
62
Checking in files
Warning
You cannot revert this action.
Checking in files
When you mark files for add or delete, check them out, integrate them, or schedule them for resolve, the
files are added to changelists. Helix Server changelists are lists of actions to be performed on files. The
actions in the changelist are performed when you submit the changelist. Pending changelists are
changelists that have yet to be submitted. Changelists are assigned unique numbers by the Perforce
versioning service. In addition, a default changelist is maintained for each client workspace. If
submission of the default changelist fails, the Perforce service assigns it a number.
63
View changelists
View changelists
To display changelists, go to View > Pending changelists or View > Submitted changelists. P4V
displays the Pending or Submitted tab in the right pane, which include a list view of changelists and
details for selected changelists at the bottom.
To filter the displayed changelists, use the Filter expansion pane in either the Pending or Submitted tabs.
You can filter by the following conditions:
n User: searches for changelists by the user who created them. Enter a user ID or Current user.
n Workspace: searches for changelists by the workspace used to create them. Enter a workspace
name or Current workspace.
n Files match any of the following file paths: searches for changelists that include files in any of
the paths that you enter. Drag the file from the Tree pane to populate the field with its file path, or
click the Construct a file path icon to open the File Path Builder.
For more information about file filters and the File Path Builder, see Searching and Filtering.
Submit changelists
You can submit a changelist by right-clicking the file name in the Tree pane or by selecting a pending
changelist from the Pending tab.
If a pending changelist includes shelved files, you first need to unshelve or delete those files, either prior
to trying to submit the changelist or from the Submit dialog.
To check in individual files:
1. Right-click the files in the depot or workspace pane and choose Submit….
2. In the Submit dialog, enter a description, select files, and (optionally) attach jobs.
The Description field accepts HTML tags for marking up and hyperlinking text. For details, see
"Formatting text in Description fields" on page 41.
3. Click Submit.
64
Reverse a changelist submission
4. If the changelist includes any shelved files, you need to delete or unshelve them before you can
submit the changelist. Do any of the following:
n Delete shelved files: Above the Shelved files area, click Delete selected.
n Unshelve shelved files: In the Shelved files area, right-click the files and select
Unshelve.
In the Unshelve dialog, edit as needed and click Unshelve.
Alternatively, you can submit the shelved files directly prior to submitting the changelist.
5. Click Submit.
Note
Only the submitter of a changelist can edit its description.
n Back out a single change or a range of changes by specifying a changelist, revision number,
date/time, or label, or a range of the same, and keep subsequent changes.
n Roll back to the state of a given changelist, date/time, or revision number.
Note
With Helix Server 2016.2 and earlier, undoing changes works as described in Reverse a changelist
submission in the P4V User Guide for version 2017.2.
65
Restrict access to a changelist
n Pending changelists: Visible only to owner, regardless of whether other users have access to
checked-out files.
n Pending changelists containing shelved files: Users with list (or higher) permission (as
specified in the protection table) to one or more of the shelved files can view those files but cannot
view the changelist description.
n Submitted changelists: Users with list (or higher) permission (as specified in the protection
table) to one or more of the submitted files can veiw those files as well as the changelist
description.
You can still submit changelists with more than the specified number of files, but the file lists are
displayed as follows:
n Pending and Submitted tabs display "There are # files in this changelist."
n Details tab displays the list of files in a simple text box (with no P4V file badges).
Undoing changes
With Helix Server 2017.1 and later, you can undo:
n A single change made at a given changelist or revision while keeping subsequent changes.
n A range of changes made at a given range of changelists or dates, or at a given label (of which you
are the owner), while keeping subsequent changes.
n All changes from a selected changelist, date, or label to the most recent version. The submitted
files become the new head revision in the depot.
66
Undoing changes
Note
Helix Server does not undo integration records with p4 undo. When P4V undoes a merge event, it
does undo the change but does not undo any integration history.
The Undo Changes dialog always opens in the context of the selected entity, which can be a workspace
or depot folder or file, a changelist, a revision, or a label. For example:
n If you open the dialog from a changelist, you can browse to a subfolder to narrow down the
operation to files in a subfolder. The folder you select must match the selected changelist.
n If you open the dialog from a revision, it opens in the context of the selected revision. You can
specify whether to undo only the specified revision, the specified revision up to another revision,
while keeping subsequent changes, or all changes from the selected revision to the head revision.
n If you open the dialog from a folder, you need to specify whether to base the operation on a
specific revision or changelist or, if you want to undo a range of changes, on a changelist,
date/time, or a label.
When undoing a range, the Undo option creates the range according to the limit type:
n For a revision number, the range goes from the selected revision to the head revision.
n For a selected label under a directory selection, the label revision numbers for the various files are
checked and undone.
n For a selected changelist, the range goes from the changelist number to "now."
n For a selected date/time limit, the range goes from the date/time (in seconds) to "now."
You can preview the undo operation before submitting your changes. You can also specify a revision as
the keyword "have." In this case, P4V applies the range for the files under the directory selection
according to each file's "have" revision.
Important
When undoing rename or move operations, make sure to perform the undo option on the changelist
that includes the rename or move operation. Otherwise, P4V will display an error message. p4
move and p4 rename operations are atomic in that you cannot split the move/add and
move/delete pair.
n Edited files: P4V restores the revision that precedes the one created when the changelist was
submitted.
n Deleted files: P4V restores the revision preceding deletion.
n Added files: P4V deletes files that were added by the changelist.
Note
With Helix Server 2016.2 and earlier, undoing changes works as described in Reverse a changelist
67
Displaying revision history
Files
To display a file’s revision history:
68
Folders
n Get a selected revision into your workspace: Right-click a revision on the History tab or a file
inside a changelist on the Submitted tab and choose Get This Revision.
n Get a different revision into your workspace: Right-click a file on the History tab, in the Depot
tree, or in the Workspace tree, and choose Get Revision. In the Get Revision dialog, specify the
revision you want to get, any applicable options, and click Get Revision.
n View a preview of a revision’s content: Select the revision on the History tab; then select the
Preview tab at the bottom of the Details pane. This shows a preview of any file at any revision.
You can resize this tab to view a larger version of the file.
n Display branching history: Click and choose the desired history from the drop-down menu.
If the file is an image, you can view thumbnails of the image by selecting View > Show Files As
and selecting the thumbnail size that you want to view.
n Compare two file revisions: Click and drag one revision to the other. P4V launches the file diff
utility and displays the differences.
Folders
To display a folder’s revision history:
n Compare two folder revisions: Click and drag one revision to the other. P4V launches the
Folder Diff Utility.
69
Changelists
Changelists
You can get revisions of a changelist from the Submitted tab. Note that this works independently from
the Depot or Workspace tree. In the Submitted tab, P4V gets the revision of all the files in the
changelist at the specified changelist, regardless of which file or folder is selected in the tree on the left.
To display a changelist's revision history:
Warning
These options immediately force-syncs the files of the respective changelist or changelists to
your workspace client. There is no intermediary step that provides you the option to cancel the
operation.
Alternatively, to get a different revision of a changelist into your workspace, right-click the
changelist and choose Get Revision. In the Get Revision dialog, specify the files you want to
get, the revision number, any applicable options, and click Get Revision.
For details about file types and attributes, see "File Types" the in the P4 Command Reference.
70
Renaming and moving files or folders
1. Right-click the file or folder you want to rename and choose Rename/Move.
The Rename/Move dialog is displayed.
2. Specify the new name in the New name field.
You can either click Submit to submit the change immediately, or Save to Changelist to submit
the renamed object at a later date.
The rename operation is not complete until you submit the changelist that contains it.
1. Right-click the file or folder you want to move and choose Rename/Move.
The Rename/Move dialog is displayed.
2. In the New location field, either type in the path of the new location or browse for it with the
Browse button.
You can either click Submit to submit the move immediately, or Save to Changelist to submit
the operation at a later date.
The object will not be moved until you submit the changelist that contains the move operation.
Warning
Changes performed by the Clean option are permanent. You cannot revert this operation.
1. Select a folder and click Actions > Clean, or right-click a folder and select Clean.
If there are files that need to be cleaned up, the Clean Workspace (Revert to Depot) dialog
appears.
P4V compares your workspace to the depot and lists the following files:
n Files that were modified locally without being checked out
n Local files that are not in the depot
71
Deleting files
Deleting files
To delete a file from the depot, you must mark it for delete, then submit the changelist containing the
marked file. When you delete a file, a new revision marked "deleted" is stored in the depot and the file is
removed from your workspace. Previous revisions in the depot are not affected.
To delete a file:
1. In the depot pane, select the two files you want to diff.
You can also select just one of the files, right-click it, and choose Diff against… to open the Diff
dialog, where you can specify the file or file version you want to diff against.
2. Right-click and choose Diff….
The Diff dialog is displayed.
3. Specify the revisions of the files you want to diff and click Diff.
P4V launches P4Merge, displaying the differences between the files at the specified revision.
Shortcut: drag the first file to the second file and drop it.
72
Diff dialog options
1. In the depot pane, select the two folders you want to diff.
2. Right-click and choose Diff….
The Diff dialog is displayed
3. Specify the revisions of the folders you want to diff and click Diff.
P4V launches the Folder Diff Utility, displaying the differences between the folders at the
specified revision.
The resulting display is based on your current client view. In the case of added and deleted files,
the folder diff utility displays the location where the files would reside if they existed.
Alternative: you can right-click one folder, select Diff Against…, and select the folder you want
to diff against in the Diff dialog.
73
Check workspace consistency
n Specify revision: enables you to designate the desired revision using a revision number,
changelist number, date, label, or workspace.
n Files that need to be added to or deleted from the depot (files you have created or deleted in the
workspace)
n Files in the depot that need to be retrieved to your workspace (files that changed in the depot after
you retrieved them)
n Files you have edited but not submitted.
n Local files that you changed without first opening them for edit or without setting write permission
(for example, using :w!< in vi.)
The folder diff utility also detects client view mapping disparities such as:
To prevent or correct disparities that arise from changes to your client view, retrieve the affected files
(choose Get Latest Revision).
Note
This setup requires P4V and P4Merge 2015.1 or later.
74
Shelving files
1. Set P4ENVIRO.
n On Windows platforms, set P4ENVIRO as a Windows environment variable (Advanced
system settings > Environment Variables):
P4ENVIRO=%USERPROFILE%\p4enviro.txt
n On Linux platforms:
export P4ENVIRO=~/.p4enviro
2. Depending on your platform, create the file %USERPROFILE%\p4enviro.txt or
~/.p4enviro containing the following line:
diff.sthresh=100000
This example is set to 100,000, but the actual value you choose should be greater than the
average number of lines in the two files being compared.
For more information on the environment setting, see P4ENVIRO in P4 Command Reference.
Shelving files
Shelving enables you to store copies of open files temporarily in the shared Helix Server repository
without checking them in. Shelving is useful for a variety of purposes, including taking and restoring
snapshots of in-progress work and reviewing other users' code before it’s checked in. When you shelve a
file, a copy is placed in a pending changelist from which other users can unshelve it. Pending changelists
that contain shelved files are displayed with the following icon and badge: . When the changelist is
expanded, shelved files are listed under the Shelved Files node, indicated with the following icon: .
When you manage shelved files, note the following:
n Basics: To be shelved, a file must be checked out. However, you cannot unshelve a checked-out
file.
n Submitting shelved files: As of Helix Server 2013.1, you can submit a shelved file directly. For
previous versions of Helix Server, you must first unshelve a file to submit it, then delete the
shelved copy. (Unshelving does not delete the shelved copy.)
n Managing changelists: You cannot move a shelved copy to another pending changelist. If you
revert a file after shelving it, the copy remains shelved in the changelist until you delete it. Only the
changelist owner can reshelve or delete files that are shelved in the changelist. For Helix Server
releases that predate version 2013.1, you cannot submit a changelist that contains shelved files;
you must delete the shelved copies before submitting. Starting with Helix Server 2013.1, you can
submit shelved files directly, but your changelist must contain only shelved files.
n File history: No file history is created when you shelve or unshelve files.
75
Shelve checked-out files in a pending changelist
n Diffing: You can diff shelved copies just as you diff any other file. For example, to display any
changes you made after shelving a file, drag the shelved copy and drop it on the checked-out file.
Alternately, you can shelve a checked-out file by dragging it from the pending changelist or depot pane to
the Shelved Files node of the changelist where you want it shelved.
Unshelve files
After shelving a file, you or another user can unshelve it, which restores the shelved copy to your
workspace and opens it in the changelist of your choice. Unshelving does not remove files from the shelf.
To unshelve files in a pending changelist:
To unshelve a file that was shelved by another user, you must have permission to check out the file.
When you unshelve a file that was shelved by another user, it is copied to one of your changelists, from
which you can edit and submit the file.
76
Submit shelved files
To unshelve a file into a different branch than the one it was shelved in:
Note
Unshelving shelved changes into different branches or related streams is only available with Helix
Server 2013.1 or later.
Note
If there are non-shelved files along with shelved files in a pending changelist, you must first revert the
non-shelved files or move them to another changelist. You cannot submit shelved files from a task
stream.
To submit shelved files in a pending changelist, right-click the changelist or shelved files folder and
choose Submit Shelved Files.
77
5 | More file management tools
This chapter describes P4V’s advanced file management tools.
When multiple revisions contribute to an integration, the Revision Graph displays a bracket below the
contributing revision, as shown in the following figure:
To display details about the meaning of the shapes and the lines that connect them, click the Legend
tab in the lower right pane.
78
Navigate the revision graph
The top bar of the revision graph displays the changelist that created the file revision. To view the
changelist (or sync to it or integrate it), right-click the changelist number.
To zoom in or out, move the slider in the toolbar or hold down the CTRL key and use the mouse wheel.
Highlighting shows the revisions that have contributed content to the selected revision or received
content from it. To highlight file revisions, select the revision of interest and choose an option from the
Highlight menu.
To diff two revisions, drag one revision to another or select the revisions, then right-click and choose
Diff Revisions.
To move a line of revisions up or down: select it and click CTRL-up arrow or CTRL-down arrow.
n To remove a file or folder from the main window, clear the respective checkbox in the File
Filter Tree.
n To enter a more precise file filter, click Filter Options and enter the file specification for the
files and folders you want to retain in the main window pane (or, for files and folders you want to
exclude, exclusionary lines preceded by "-"), check any filtering options you want to apply, then
click Filter. To retain this filter in effect for future invocations of Revision Graph, click Set As
Default.
To further compress the detail displayed in the main window pain, toggle the options on the View
menu as follows:
n File Renames Collapsed: Displays the original and renamed files on a single line instead of
multiple lines by omitting intervening revisions. An angled arrow indicates the operation, as shown
79
Display details
n Compressed Integration History: Displays only revisions that were branched or integrated.
To switch between displaying only ancestors and descendants (linear history), which is the default view,
and showing the full revision history, use the branch history button . To change the default behavior,
go to Edit > Preferences > Tools. For details, see "Tools" on page 54.
Display details
To display details about a file revision, click the revision in the main window. Details are displayed in
the lower left pane.
Related revisions are listed on the Integrations tab. To get the revision, diff it, or display its history,
right-click the revision on the Integration tab. To view integrated revisions in the main window, click
the corresponding icon on the Integrations tab.
Note
Time-lapse view of image files works differently than described here. For more information, see
"Viewing image file history with Time-lapse View" on page 82.
80
Toolbar
Toolbar
Mode Determines how many revisions are displayed. Options are:
Scale Specifies the unit used: changelist number, date, or revision number.
Aging Displays color coding to indicate how recently a change was entered. The darker the
shading, the more recent the change.
Lifetimes Toggles display of lifetimes, which are graphics that indicate by their width how long
the adjacent chunk of text has been in the file.
Branch Display branching (merge/integration) history. Branch information appears above the
history timeline.
Originating Display information for the originating changelist for each revision. For a revision that
changelist has been integrated from another codeline, the branching history view provides
changelist information only for the integration, not necessarily the changelist in which
the content of the file was actually changed; that is, the originating changelist.
81
Slider
Go to Go to previous change.
Previous
diff
Line Specifies how line endings and whitespace are treated to determine differences.
ending
Slider
The slider enables you to browse rapidly through file revisions. The appearance of the slider corresponds
to the mode you select. The unit by which the slider advances is specified by the mode you select (date,
changelist, or revision). The revision, date, or changelist number is displayed under the slider.
incremental Move it to the right to display the next pair of file revisions, or left
diffs to display the previous pair of file revisions.
multiple Move the right and left halves separately, to control how many
revisions revisions are displayed.
n BMP
n GIF
n JPG, JPEG
82
Viewing image file history with Time-lapse View
n PNG
n PBM
n PGM
n PPM
n TIFF
n XBM
n XPM
To control the Time-lapse View display, use the following settings and features.
Scale Specifies the unit used: revision number, date, or changelist number.
Current Specifies the current revision being displayed, in the unit selected in the Scale field.
selection
Retrieved Specifies the starting and ending revision displayed, in the units selected.
range
Slider Move the slider to the right to display the next file revision or left to display the
previous revision. The revision, date, or changelist number is displayed under the
slider.
83
Using the folder diff utility
84
Using the folder diff utility
5. The Folder Diff utility lists the subfolders and files in both diffed folders, side-by-side.
Tip
You can use the following shortcut keys to expand or collapse a folder:
n Ctrl+Shift+Right Arrow (expand)
n Ctrl+Shift+Left Arrow (collapse)
Ivory highlight indicates file is present in only one of the two folders.
You can select from among the following display options (most of these can be used in
combination):
You can view details about a file by selecting it. The selected file is highlighted in a darker hue.
File details appear in the following tabs below the diff windows:
n Details
n Integrations
n Labels
n Preview
You can also view a brief description of the latest change to any file by placing your mouse over
the file icon.
85
Diffing text files
Diffing images
P4V lets you diff the following image file types:
n BMP
n GIF
n JPG, JPEG
n PNG
n PBM
n PGM
n PPM
n TIFF
n XBM
n XPM
You can compare two different image files or two revisions of the same image. In both cases, P4V
launches P4Merge, where you can navigate the differences between the specified images.
For more information, see View image differences in the P4Merge User Guide.
To diff two different image files:
Alternatively, in the Depot or Workspace tree, or in the Files tab, you can drag one image file’s icon onto
another.
To diff two revisions of the same image file:
86
Merging files
Alternatively, you can drag one of the desired revisions onto the other revision.
Merging files
If you and another user have edited the same file, P4V requires you to resolve those changes. One way
of resolving is by merging your changes with the other changes using P4Merge. P4Merge enables you to
compare two text files with a common base file to locate differences and to select the text that you want
in the merged result file. The purple icon ( ) is associated with the file that another user edited (their file),
and purple bands highlight text that is unique to that file. The green icon ( ) is associated with file that
you edited (your file), and green bands highlight text that is in the second file but not the first file. The
base file is indicated by the yellow icon ( ), and yellow highlighting indicates text that is in the base file
but not in the other files.
In the top half of the window, P4Merge displays the base file surrounded by the two changed versions of
the revision being merged. In the bottom half of the window, P4Merge displays the merge results file,
where you select or enter the text that you want to check in. Make your changes as described below, and
be sure to save them before exiting P4Merge.
For more information on resolving changes, including opening P4Merge, see "Resolving files" on
page 92.
For more information on merging changes in P4Merge, see Navigate diffs and Merge text in the P4Merge
User Guide.
87
6 | Managing codelines
This chapter discusses how to manage standard branching and merging workflow.
Creating branches 88
Merging files between codelines 89
Open files for merge 90
Resolving files 92
Resolve individual files 92
Resolve multiple files 94
Managing branch mapping 95
Work with branch mapping 96
Managing labels 98
Create labels 99
Label files 99
Display and search for labels 100
Edit labels 100
Delete and unload labels 100
Retrieve file revisions in a label 101
Display files associated with a label 101
Managing jobs 102
Create a job 102
Add a job to a pending changelist 102
View jobs 102
Search for jobs 103
For more information about viewing file history, including branching history, see "Displaying revision
history" on page 68 and "Viewing codeline history in the revision graph" on page 78.
For more information about using streams, which provide a very structured branching strategy, see
"Working with streams" on page 115.
Creating branches
When you branch a codeline or stream, you create a copy of the source files and folders that is linked to
the source by integration history. Typically you create a branch to enable concurrent work, perhaps to
stabilize a release without impeding development or to permit experimentation without jeopardizing the
stability of a mainline. Best practice is to keep the less stable branch up to date with its more stable
neighbor by merging from it, then updating the neighbor with completed, stable work by copying. This
approach ensures that no work is overwritten, and these policies are encoded into Helix Server streams.
To branch a codeline or stream:
1. Select the source folders and files, right-click and choose Branch.
The Branch dialog is displayed.
88
Merging files between codelines
2. In the Choose target files/folder field, specify the branch that you want to create. (Note: if the
target already exists, you are not branching: you’re merging — or integrating in the terminology of
the P4 Command-line Client).
3. Configure any desired options (for details about options, see "Merging files between codelines"
below) and click Branch. Files are opened for branch in a pending changelist.
4. If you’ve chosen the auto-submit option, the pending changelist is submitted immediately. If
you’ve chosen Add files to pending changelist, submit the changelist when you are ready to
create the branch.
Click Set Defaults to open the Branch preferences page, where you can set default behaviors for the
Branch dialog.
Note about Helix Server terminology: The term branch refers to a codeline, but is sometimes used as
shorthand for a branch specification or branch mapping, which is a stored source/target mapping that is
used to record and simplify branch operation.
If you are merging changes into an existing codeline, you are required to resolve the files to ensure that
you do not overwrite other users' changes and to preserve the file’s revision history. Typical steps for
propagating changes from one codeline to another are as follows:
When you open files for merge, you can specify the mapping of source to target using either a file
specification or a branch mapping.
89
Open files for merge
n File specification: you specify the source and target files when you open files for merging.
n Branch mapping: you select a branch mapping when you open files for merging. Branch
mappings enable you to predefine source and target codelines. For details about branch
mappings, see the Helix Core Server User Guide.
Note
The workflow for propagating change between streams ("merge up, copy down") is simple and
specific. For more information, see Merging Down and Copying Up between Streams.
Note
In the P4 Command-line Client, the term integrate is used not only to encompass all three integration
types (branch, merge, copy), but is also used synonymously with the P4V term merge.Within P4V,
merge can refer both to merging files from one codeline to another and to merging conflicts between
files (the function performed by P4Merge).
1. Select the source files and folders, then right-click and choose Merge/Integrate.
The Merge/Integrate dialog is displayed.
2. For Merge method, choose Specify source and target files.
The source files that you selected in step 1 are listed in the Source files/folders field.
3. Specify the target files and folders by typing or browsing to the destination.
90
Open files for merge
91
Resolving files
n Check for opened files and warn prior to merging: Detect whether any of the selected
files are open for other actions.
Note
P4V uses different P4 commands to apply these integrate flags, depending on the
integration method:
l Stream-to stream method: p4 merge
l Branch mapping and files and folders methods: p4 integrate
For more information about these P4 commands and flags, see the P4 Command
Reference.
Click Set Defaults to open the Merge-Integrate preferences page, where you can set default behaviors
for the Merge/Integrate dialog.
Resolving files
Conflicts occur when you attempt to merge a file into an existing codeline or submit a changelist
containing a file that another user has edited and submitted while you had the file checked out. When the
conflict occurs, Helix Server schedules the file for resolve. Conflicts must be resolved before you can
submit the changelist that contains the conflicting file. To indicate a file that needs resolving, P4V
92
Resolve individual files
93
Resolve multiple files
6. Follow the recommended action (highlighted in blue), or select another resolve option:
n Accept Source: Replaces the copy of the file in your workspace with the version that is in
the depot, discarding your changes.
n Accept Target: Accepts the file that is in your workspace, overwriting the version that is in
the depot when you submit the file.
n Accept Merged: Replaces the file in your workspace with the merged result of the two
files listed in the box at the top of the screen.
n Run Merge Tool: Open the merge tool to edit the file and save the merged result (P4Merge
is the default merge tool, but you may have chosen another tool in P4V Preferences).
As each file is resolved, it is removed from the list of Files to resolve.
7. To check in the changes, submit the changelist that includes the resolved files.
94
Managing branch mapping
To resolve multiple files one at a time (recommended when there are conflicts):
95
Work with branch mapping
Note
Helix Server Streams provide an alternative approach to managing codelines. For more information,
see the "Streams" chapter in in the Helix Core Server User Guide.
//depot/jam_proj/... //depot/jam_r2.0/...
To view a branch mapping, go to View > Branch Mappings or click the View branch mappings
button in the toolbar. Use the Filter pane at the top of the Branch Mappings tab to search for mappings
by owner and branch mapping name (or part of the name). Double-click a branch mapping to view it.
To change a branch mapping, double-click it in the Branch Mappings tab to open the Branch
Mapping dialog. Click Edit to enter your changes.
To delete a branch mapping, click the mapping you want to delete, then select Edit > Delete Branch
branchname.
To integrate using a branch mapping:
1. Right click the files you want to integrate and choose Merge/Integrate.
The Merge/Integrate dialog is displayed.
2. Select Use branch mapping as your Merge method.
96
Work with branch mapping
3. Browse for the branch mapping you want to use. Select the branch mapping and click OK.
The dialog refreshes to show a table with Source and Target columns and an arrow icon in
between. By default, the arrow indicates the direction of the merge from source to target. You can
use the option buttons labeled source and target at the bottom of the Filter tab to reverse the
direction of the merge. If source is selected, files are merged from source to target. If target is
selected, files are merged from target to source. Changing this selection also switches the
direction of the arrow icon as well as the Source and Target columns.
Important
If you perform a merge/integrate operation from a file directory that is located at a higher level
than what is specified in the branch mapping view, you see a bi-directional arrow icon instead
of a directional arrow icon. This indicates that you are about to perform an advanced two-way
integration: first from source to target and then from target to source. Clicking Merge brings up
a warning that prompts you for confirmation. If you want to go back to a one-directional merge,
remove the path you are filtering with from the Merge only the following files/folders field in
the Filter tab. Removing the path turns the bi-directional arrow icon into a directional arrow
icon. Alternatively, you can cancel the merge and select a lower-level folder for the integration.
97
Managing labels
Warning
The following integration flags can have unexpected or undesired results. Do not select them if
you are not certain you want these actions to be applied.
n Try to integrate changes when source deleted and re-added (-Di): If the target file has
been deleted and the source file has been changed, this option re-branches the source file
on top of the target file. If the source file has been deleted and the target file has changed,
this option deletes the target file. By default, outstanding edits cannot be integrated with a
deleted file.
n Force integration on all revisions, disregarding integration history (-f): Integrate all
revisions of source and target files, including revisions that have already been integrated.
Typically used with a specified revision range.
n Do not get latest revision of selected files (-h): Use the workspace revision of the
target file. By default, the head revision of the target file is automatically retrieved into the
workspace before integrating.
n Disregard indirect integration history (-1): Restrict selection of the base file revision to
direct (parent-to-child or child-to-parent) integration history.
n Propagate source filetypes to target files (-t): Assign the target file the same file type as
the source file (when integrating to existing target files).
n Skip previously merged 'cherry-picked' revisions to improve merge results (-Rs):
Skips cherry-picked revisions that have already been integrated. This option can improve
merge results, but can also require multiple resolves per file.
n Check for opened files and warn prior to merging (might affect server
performance): Checks for files currently open and displays a warning before the merge.
6. To preview the results of the operation, click Preview.
7. To integrate the files using the selected branch mapping, click Merge.
Managing labels
You can use labels to:
98
Create labels
n Mark important file revisions, for example the set of file revisions used to build a particular
software release
n Specify groups of related file revisions in operations such as getting file revisions (syncing) and
integration
To use labels, you first define the label and then apply the label to file revisions in the depot. When you
define a label, you specify a label view, which limits the files to which the label can be applied.
Create labels
1. Select File > New > Label.
2. In the Label form, enter a name for the new label.
3. Enter a description of the label.
The Description field accepts HTML tags for marking up and hyperlinking text. For details, see
"Formatting text in Description fields" on page 41.
4. To prevent other users from modifying the label, select locked.
5. Specify the label view one of two ways:
n Textually: on the Form tab, in the View field, specify the depot location of the files.
n Graphically: on the View tab, select depot paths.
6. Click OK.
Label files
To label a file, it must be in the label view and synced to your client workspace.
99
Display and search for labels
2. Browse for the label you want to use from the Label field.
3. Choose the Remove selected label from files option.
4. Click Label.
n Owner
n Label name
n File paths
You can enter as many file paths as you like. The filter retrieves labels associated with all files in
all file paths entered (restricted by any owner and label name included in the filter). You can use
the File Path Builder to construct file paths.
Note
Global labels display as gray when you are connected to an edge server. Grayed-out labels are not
editable when you are connected to the edge server, regardless of permissions, but you can still use
them.
For more information on using filters, see "Searching and filtering" on page 34.
Edit labels
You can edit a label at any time. Editing a label does not change the list of files to which the label is
applied.
1. Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
2. Right-click the label and select Edit Label 'label_name' .
The Label form is displayed.
3. Enter your changes,and click Save.
100
Retrieve file revisions in a label
1. Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
2. Right-click the label and select Delete Label 'label_name'.
To unload a label:
1. Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
2. Right-click the label and select Unload Label 'label_name'.
1. Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
2. Select the Unloaded icon in the filter pane to open the Unloaded Labels dialog, where you
can filter for and select unloaded labels to reload.
3. Right-click the label and select Reload label 'label_name'.
1. Go to View > Labels or click the Labels icon in the toolbar to open the Labels tab.
2. Right-click the required label and select Get Revision.
The Get Revision dialog opens.
3. Click Add to open the Add Files/Folders dialog.
4. To retrieve all file revisions in a label, click the top-level folder (//). To retrieve a subset of the file
revisions in the label, browse to the folders and files that you want and select them.
5. Click OK to display the selected folders in the list of files to be retrieved.
6. To ensure that your workspace contains only the labeled file revisions, select Remove files from
workspace if they are not in label.
7. Click Get Revision to retrieve the labeled file revisions.
1. On the Labels tab, make sure the bottom pane including the Details and Files tabs is expanded
(visible). If it is not, move the pointer over the bottom tab border until it changes into up/down
arrows; then click and drag it upward to expand the pane.
2. Select a label to display its associated files in the bottom pane.
3. In the bottom pane, click the Files tab to view the list of files associated with the label.
101
Managing jobs
Managing jobs
Jobs enable you to record requests for work. You can associate jobs with changelists to track the work
done to fulfill the request. When the changelist is submitted, the job can be closed. Jobs are displayed on
the Jobs tab.
Create a job
1. Open the Job form by doing one of the following:
n Choose File > New > Job.
n Right-click anywhere in the job list pane on the Jobs tab.
2. Fill in the Job form.
The fields that appear on the Job form depend on the customizations set up by your Helix Server
administrator. See "Customizing Perforce: Job Specifications" in the Helix Core Server
Administrator Guide: Fundamentals.
The Description field accepts HTML tags for marking up and hyperlinking text. For details, see
"Formatting text in Description fields" on page 41.
View jobs
To show the Jobs tab, go to View > Jobs.
To specify the columns displayed in the Jobs list view: right-click in the column heading and enable
or disable the desired columns. To change the order in which columns are displayed, drag the
column headings right or left to the desired position.
To sort jobs by date: by default, P4V displays dates using the operating system format, which does not
sort chronologically. For true chronological sorting, configure P4V to display dates using the Helix Server
format of yyyy/mm/dd. Go to Edit > Preferences (Windows) or P4V > Preferences (Mac) and, on the
Display page, click the Format dates using Perforce standard option.
102
Search for jobs
103
Search for jobs
104
Search for jobs
For more information about Helix Server job query syntax, see "Defect Tracking" in the Helix Core Server
User Guide.
105
Search for jobs
To enter file paths directly into the Files match any of the following file paths field, do any of the
following:
To get help constructing a file path, use the File Path Builder.
106
Search for jobs
1. Click the Construct a search query icon to open the Job Query Builder.
107
Search for jobs
Some values are editable; others are predefined and can be selected from a drop-down list:
108
Search for jobs
n To nest conditions (for example, if you want to select any open job owned by user bruno
and containing the term installation or administration), click the button:
A nested row appears, with the option to match Any or All conditions:
l 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.
l 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.
As you enter or select values, the resulting file path appears in the Query preview: field:
3. Click OK.
The query that you built appears on the Jobs tab in the Keywords or search query: field.
109
7 | Advanced P4V options
This chapter describes options for advanced P4V users and command-line users.
Environment considerations
P4V launches the specified custom tool in an external process. Perforce settings are exported to the
external process as follows: the P4PORT, P4USER, P4CLIENT and P4CHARSET settings in effect
for the P4V connection are exported to the external process, plus any other Perforce settings present in
the environment in which P4V is running, including command-line arguments specified when P4V was
launched and global settings (on Windows machines, settings configured using the p4 set -s
command).
If the P4CONFIG environment variable is set, the tool recognizes any P4CONFIG files present in the
file hierarchy on which it is operating. Settings in P4CONFIG files override settings in the environment.
To ensure that P4CONFIG settings do not override environment settings, select Ignore P4CONFIG
files. (For details about config files, refer to the P4 User’s Guide.) If you are passing arguments to a
custom tool, select Ignore P4CONFIG filesto ensure that the server settings used by the custom tool
correspond to the values that are passed.
On a Mac, custom tools are not launched from a shell by default. For tools that must recognize
P4CONFIG settings, create a script that launches a shell before invoking the tool, or define P4CONFIG
globally (for example, in /etc/profile, /etc/profile.local, or /etc/csh.login). To
spawn a shell using Bourne shell, issue the #!/bin/sh command. For the C shell, issue the
#!/bin/tcsh command.
If you need to keep a tool running or launch another application, run it in the background and exit the shell
or process that was launched by the custom tool. This approach ensures that you do not block another
tool and that the application will remain open when you exit P4V.
110
Add custom tools
Important
To define tools that issue p4 commands, specify p4 in the Application field and the command
and desired arguments ( for example, fix -c %c job000001 ) in the Arguments field.
In general, be sure to specify the application and arguments separately in the fields provided.
111
Add custom tools
6. In the Arguments field, enter command arguments using the specifiers listed in the following
table.
Note
Some arguments have an uppercase and lowercase form. To run the tool once, submitting all
values together, specify the uppercase argument. To run the tool once for each value, specify
the lowercase form.
%a Selected label
%b Selected branch
%C, %c Selected changelists
%D, %d Selected files or folders (depot syntax used for depot files)
%F, %f Selected files (workspace syntax used for depot files)
%i Selected workspace specifications
%J, %j Selected jobs
%O, %o Depends on which pane has focus:
n When left pane has focus, selected checked out files.
n When right pane has focus, all checked out files.
%P, %p Selected pending changelists
%S, %s Selected submitted changelists
%t Selected stream
%u Selected user
$c Current workspace specification
$p Current port
$r Current client workspace root
$u Current user
$D Arguments from prompt dialog
$% Literal '%' character
$$ Literal '$' character
112
Import and export tools
"C:\Program Files\scripts\changelistreport.pl" %p
n You can specify only one % argument per tool definition.
n Uppercase specifiers send values to the command as a group, while lowercase specifiers
run the command once for each value.
For example: mycommand %F runs mycommand arg1 arg2 arg3 and
mycommand %f runs mycommand arg1; mycommand arg2; mycommand
arg3.
n If your custom tool includes arguments from a prompt dialog $D), you must warn users to
avoid the "&" character when they enter a string value in your custom tool prompt. The "&"
value is a special character.
7. In the Start in field, specify the directory where you want the command to execute. You can
specify the directory using operating system syntax (for example:
C:\tmp, or /tmp), or specify %f, which uses the directory of the selected file.
Note
If you specify %f, omit any other values. For example, %f\temp is invalid.
8. To execute the application in a terminal window that displays standard input and output, select
Run tool in terminal window.
9. To enable users to enter arguments after they choose the custom tool menu item, select Prompt
user for arguments and enter a description of the required arguments in the Description field. To
enable users to browse when prompted, select Add file browser to prompt dialog.
10. To refresh P4V after the tool application finishes running, select Refresh P4V upon completion.
11. To save your entries, click OK.
12. To add a shortcut for the tool, double-click the Shortcut column and enter the desired key
combination.
If a shortcut is reserved or already in use, P4V displays a warning message.
13. To exit the Manage Custom Tools dialog, click OK.
113
Launching P4V components from the command line
To export tools:
Note
On Windows, if a tool does not run, verify that the files that it opens have their extensions mapped to
the required application.
114
8 | Working with streams
This chapter provides an introduction to Helix Server Streams and describes how to use them.
About streams
Helix Server streams are "branches with brains," a containerized approach to managing bodies of related
files such as codelines. Streams associate these bodies of related files with rules that define how you
can work with those files, including how you can move changes between them. Most notably, streams
are defined hierarchically using the mainline model, and Helix Server generates the views for workspaces
that are associated with a stream based on strictly inherited rules. Among the advantages of this
approach are (1) change is propagated in a controlled way through the hierarchy that you define, and (2)
you can compose the contents of a stream by defining its view, thereby providing all users who work in
the stream with a consistent view of its contents.
Stream views
A stream is defined not just by its type, but also by its view, which specifies the files and folders that the
stream contains and whether they can be edited, merged down, copied up, or branched to a new stream.
Stream views define the files that you can work on in your workspace and what you can do with them.
They also restrict the files that a child stream inherits from its parent. For example, let's say you have a
mainline stream that includes the following directories of files:
//Acme/Main
--apps
115
Propagating change between streams
--api
--resources
--docs
You want to branch to a development stream. You only need to work in the apps folder, but you need
resources from the api and resources folders. You can create a development stream as a child of Main
that includes the files in the apps folder, excludes the files in the docs folder, and imports the contents
of the api and resources folders so you can use them but cannot edit and submit any changes to the
depot. You assign a stream view to the child stream that enacts these rules. Helix Server generates the
workspaces -- and enforces the submit and integration rules -- from the stream view. Any children
branched from this new stream inherit those rules. You can assign a more restrictive stream view to
subsequent children, but you cannot assign a less restrictive one. Child streams cannot branch more
than their parent streams are willing to share.
For more information, see "About stream views" on page 118.
Stream depots
Streams are stored in a stream depot, which is displayed in P4V like this: . You cannot add a stream
to a "classic" Helix Server depot. You can add streams depots through P4Admin or the P4 command-line
client.
For more information, see "Setting up streams" on page 124.
Stream types
Perforce codifies the soft-to-firm model of stability in its standard stream types:
n Mainline: A stream with no parent. Expects merging down from more stable child streams.
Expects copying up from less stable child streams. Used as the stable trunk of a stream system.
116
Stream depots
n Release: A stream that is more stable than its parent. Expects merging down from more stable
child streams. Does not expect copying up from its parent stream. Useful for ongoing
stabilization, bug fixing, and release maintenance.
n Development: A stream that is less stable than its parent. Expects merging down from its
parent stream. Expects copying up from its less stable child streams. Does not expect to have
more stable child streams. Useful for long-term projects and major new features.
n Task streams are lightweight, short-term branches that you can use for work that affects a
small portion of a full project branch. Task streams enable you to work privately, switch contexts
quickly, and reduce the amount of metadata managed by the Perforce service.
For more information, see "Working with task streams" on page 135.
n Virtual streams provide users with the ability to restrict the workspace view of a real stream.
Virtual streams act as a filter. They are useful when you want to:
l Submit changes directly to a stream but do not want to sync all of the files in the stream view
to your workspace.
l Develop against the same stream but switch imported libraries, such as when you develop
across multiple platforms.
For more information, see "Working with virtual streams" on page 140.
In the stream graph, the most stable streams are always at the top and the least stable at the bottom. The
stream graph also displays the parent-child relationships that control the propagation of change between
codelines. All streams are children of the mainline, and all children can be parents of yet more children of
the same type, enabling specific development and release codelines while ensuring that changes are
propagated properly between codelines. The stream graph represents those paths of change propagation
using arrow connectors.
117
Terminology differences between command line client and P4V
For more information, see "Using the stream graph" on page 127.
n share: Files in shared paths can be synced (retrieved), submitted, and integrated (branched,
merged, and copied). Shared paths are used for files whose changes will flow to and from other
streams.
n isolate: Files can be edited but the resulting changes cannot be integrated to other streams.
Isolated paths are useful for storing nightly builds and other generated files, like bin directories.
n import: Files are sourced from a specified location, and can be synced but cannot be submitted or
integrated. Use imported paths for components such as third-party libraries, which are required for
building but are never edited. An imported path inherits its view from the parent stream unless its
depot location is defined explicitly. Icons of imported files and folders are decorated with a halo
in the parent stream from which they are imported.
n import+: Functions like an import path in that it can reference an explicitly defined depot path, but
unlike a standard import path, you can submit changes to the files in an import+ path.
118
Stream path syntax
n exclude: Prevents files that would be inherited from the parent files from becoming part of the
stream. Files in excluded paths cannot be synced, submitted, or integrated.
The following table shows the behavior of each path type at a glance:
share qa/...
Note
Stream views do not allow positional specifiers (%%1) or overlay mapping (+).
Helix Server rejects leading wildcards. However, it accepts a single trailing asterisk (*). For example,
if you use share * in the Paths: field in the stream spec, Helix Server accepts it and interprets it
as a wildcard for the current directory.
Tip
To search for a specific string in the stream spec, click inside the Paths: field and then press
Ctrl+F. This opens the Find dialog.
119
Examples
Incorrect Correct
Stream: //Acme/Main Stream: //Acme/Main
Parent: none Parent: none
Paths: share apps/... Paths: share apps/...
share tests/... share tests/...
share config/...
Examples
This section includes simple and more complex examples of stream usage.
Simple share
Let's start with a simple case: two streams, //Ace/main and its child, //Ace/dev.
Stream: //Ace/main
Parent: none
Paths: share ...
Stream: //Ace/dev
Parent: //Ace/main
Paths: share ...
120
Examples
In this case, the entire stream path is shared. When you switch your workspace to the //Ace/main
stream, the workspace view looks like this:
//Ace/main/... //your_ws/...
The workspace view maps the root of the //Ace/main stream to your workspace. When you switch
your workspace to the //Ace/dev stream, the workspace view is this:
//Ace/dev/... //your_ws/...
And the branch view for //Ace/dev/ looks like this:
//Ace/dev/... //Ace/main/...
In other words, the entire dev stream can be synced to workspaces, and the entire stream can be
branched, merged, and copied.
Stream: //Acme/Main
Parent: none
Paths: share apps/...
share tests/...
import stuff/... //Red/R6.1/stuff/...
import tools/... //Tango/tools/...
If you switch your workspace to the //Acme/Main stream, this would be your workspace view:
//Acme/Main/apps/... //your_ws/apps/...
//Acme/Main/tests/... //your_ws/tests/...
//Red/R6.1/stuff/... //your_ws/stuff/...
//Tango/tools/... //your_ws/tools/...
The stream's Paths field lists folders relative to the root of the stream. Those are the folders you will get
in your workspace, beneath your workspace root. The shared folders are mapped to the //Acme/Main
path, and the imported paths are mapped to their locations in the //Red and //Tango depots.
Stream: //Acme/XProd
Parent: //Acme/Main
121
Examples
//Acme/Main/apps/... //your_ws/apps/...
//Acme/XProd/apps/bin/... //your_ws/apps/bin/...
//Acme/XProd/apps/xp/... //your_ws/apps/xp/...
//Red/R6.1/stuff/... //your_ws/stuff/...
//Tango/tools/... //your_ws/tools/...
-//Acme/XProd/tests/... //your_ws/tests/...
Here we see stream view inheritance at work. Imported paths are mapped to whatever they're mapped to
in the parent's client view. The shared and isolated paths are mapped to the child stream; these contain
the files the XProd team are working on and will be submitting changes to. And the excluded path
(marked with a minus sign in the view) doesn't appear in the workspace at all.
Because the //Acme/XProd stream has a parent, it has a branch mapping that can be used by the
copy and merge commands. That branch view consists of the following, with just one path shared by the
child and parent (note that you must use P4, the Perforce Command Line Client, to view stream branch
views):
-//Acme/XProd/apps/... //Acme/Main/apps/...
-//Acme/XProd/apps/bin/... //Acme/Main/apps/bin/...
//Acme/XProd/apps/xp/... //Acme/Main/apps/xp/...
-//Acme/XProd/stuff/... //Acme/Main/stuff/...
-//Acme/XProd/tests/... //Acme/Main/tests/...
-//Acme/XProd/tools/... //Acme/Main/tools/...
When you work in an //Acme/XProd workspace, it feels as if you're working in a full branch of
//Acme/Main, but the actual branch is quite small.
Stream: //Acme/BobDev
Parent: //Acme/XProd
Paths: share ...
122
Examples
Bob's stream has the default view template. Given that Bob's entire stream path is set to "share," you
might expect that his entire workspace will be mapped to his stream. But it is not, because inherited
behaviors always take precedence; sharing applies only to paths that are shared in the parent as well. A
workspace for Bob's stream, with its default view template, will have this client view:
//Acme/Main/apps/... //your_ws/apps/...
-//Acme/BobDev/tests/... //your_ws/tests/...
//Acme/BobDev/apps/bin/... //your_ws/apps/bin/...
//Acme/BobDev/apps/xp/... //your_ws/apps/xp/...
//Red/R6.1/stuff/... //your_ws/stuff/...
//Tango/tools/... //your_ws/tools/...
A workspace in Bob's stream is the same as a workspace in the XProd stream, with one exception: the
paths available for submit are rooted in //Acme/BobDev. This makes sense; if you work in Bob's
stream, you expect to submit changes to his stream.
By contrast, the branch view that maps the //Acme/BobDev stream to its parent maps only the path
that is designated as shared in both streams:
-//Acme/Main/apps/... //XProd/apps/...
-//Acme/BobDev/tests/... //XProd/tests/...
-//Acme/BobDev/apps/bin/... //XProd/apps/bin/...
//Acme/BobDev/apps/xp/... //your_ws/apps/xp/...
-//Red/R6.1/stuff/... //XProd/stuff/...
-//Tango/tools/... //XProd/tools/...
The default template allows Bob to branch his own versions of the paths his team is working on, and have
a workspace with the identical view of nonbranched files that he would have in the parent stream.
Remap files
Files can be remapped, which enables you to place them in a workspace location that differs from their
depot location. For example, the following view specifies that the parent's docs files reside beneath the
doctools path in workspaces defined for this stream.
Remapped:
Remapped:
docs/... doctools/docs/...
Ignore files
You can specify a list of file or directory names to be ignored in workspace views, which is useful for
ensuring that artifacts such as object files or other interim files are never checked in or integrated. These
types are excluded by the workspace view of workspaces associated with the stream. For example:
123
Setting up streams
Ignored:
/tmp # ignores files named "tmp"
/tmp/... # ignores directories named tmp
.tmp # itnores file names ending in .tmp
Setting up streams
To set up streams for the first time, you must create a stream depot and create and populate a mainline
stream.
To create a stream depot:
1. Launch P4Admin (from P4V, choose Tools > Administration) and connect to the Perforce
service as a user that has admin privilege.
2. Choose File > New… > Depot, specify a name for the stream depot, and click OK.
The Depot dialog is displayed.
3. For Depot Type, choose stream.
4. Click OK, and verify that your new stream depot is listed in the Depots tab.
1. Launch P4V and connect to the Perforce service where you want your streams to reside.
2. Choose .
The Stream dialog is displayed.
3. Specify the name ("main" or "mainline" is a good descriptive choice), depot, and root folder. Omit
parent (the mainline has none). For stream type, choose "mainline".
4. Click OK to save your stream specification.
5. Verify that your new mainline stream is displayed in the Streams tab. Note that the mainline
stream is not displayed in the Depot tab until you populate it with files.
For more information, see "Creating new streams" on the facing page.
1. Copy the desired files and folders to the root folder of the workspace you just created (the mainline
stream).
2. In P4V, switch to the left-pane Workspace tab. Your files are displayed undecorated (that is, as
plain file icons), which indicates that they are not under Helix Server control.
3. Right-click the top-level folder and choose Mark for Add….
P4V displays the Select Pending Changelist dialog.
124
Creating new streams
4. Click OK.
In the Pending Changelists tab, verify that your files are listed in the default changelist, decorated
with a red plus sign.
5. Right-click the default changelist and choose Submit….
The Submit Changelist dialog is displayed.
6. Enter a descriptive comment and click Submit.
Note
As an alternative, you can populate streams by integrating files from existing depot locations.
To verify that your files have been submitted, check the Log pane at the bottom of the screen and the left-
pane Depot tab. If your submission succeeded, your files are listed in the mainline folder in your stream
depot. Now you can branch the files in the mainline to development and release streams, edit files in
those streams, and propagate changes among them.
1. Choose File > New > Stream or right-click a stream in the Stream Graph and select Create New
Stream from '<stream name>'….
Note
Streams must be created in a Streams depot. You cannot create a stream in a classic depot.
125
Creating stream workspaces
5. For release and development streams, choose the parent stream; for mainline streams, enter the
depot where the mainline will be stored.
By default, the stream inherits its parent’s stream view. To edit the view of the child stream, go to
the Advanced tab.
The Advanced tab options enable you to do the following:
n Edit the inherited view.
n Change the default locations of files mapped from the depot.
n Lock the stream settings so that only the owner can edit them.
n Restrict check-ins to the stream owner.
n Allow to merge the stream’s content both up and down.
n Specify file or folder patterns that you want ignored by the stream.
Ignoring a file or folder pattern prevents users from submitting files or folders that follow
that pattern, no matter the stream view definition. You can use the Ignored field to ensure
that generated files are never checked in, for example. You can enter filenames, filename
extensions, or file paths. Separate each with a line break. For example:
Note
Stream specifications do not allow wildcards (*), positional specifiers (%%1), or overlay
mapping (+).
Mainline, development, and release streams are only visible in the depot tree pane if the stream is
populated.
6. (Optional) Select whether to Create a workspace for use with this stream..
If you choose not to create a workspace immediately, you can do so later, when you want to work
in the stream.
7. (Optional) Select whether to Branch files from parent on stream creation.
If you choose not to branch files immediately, you can do so later using the Copy operation.
8. To save your entries, click OK.
126
Selecting streams
n When you create a new stream using the Stream dialog, select the Create a workspace for use
with this stream option.
n The first time that you select a stream to work in, you’ll be prompted to create a new workspace.
See "Selecting streams" below.
The Workspace dialog opens, with all necessary fields pre-populated to work with the current stream.
You can update any of the fields in the Workspace dialog, except Stream name and Workspace
mappings (which can only be changed by updating the stream’s path configuration). If you want a "back-
in-time" view of your stream, you can use the Stream At Change option to sync the stream using the
stream’s view as of a specific changelist. When you use the Stream At Change option, you cannot
submit changes to the files in the stream, since your workspace files are not at the head revision.
Selecting streams
You can select a stream to work in by doing either of the following:
n Right-click the stream in the Tree Pane or Stream Graph and select Work in this stream.
n Double-click the stream in the Stream Graph and select Work in this stream.
If you haven’t worked in this stream before, P4V prompts you to create a new workspace. You can also
add the stream to an existing workspace, if you have enabled this functionality in Preferences. For more
information, see "Work in a stream" on page 130.
127
Stream Graph display conventions
Status indicators between streams tell you which streams have changes to contribute and where the
changes can be copied or merged:
Merge indicator:
Copy indicator:
The arrows are color-coded to indicate status:
For example, the following arrows above the dev-2.1M2 stream indicate that you must update it by
merging down from its parent, after which you can copy up changes to the parent.
128
Configure the stream graph display
The workspace icon indicates the stream you are currently working in.
You can drag the workspace icon to another stream to switch your workspace to that stream. The Stream
field value in the workspace definition changes to the new stream.
Tip
You can select multiple streams and then press the Spacebar to select or clear the respective
check boxes.
5. Click Apply.
The Stream Graph displays the streams that you specified.
129
Display stream status
You can now access the filter from the filter list .
7. To close the filter pane, click the arrow icon again.
8. (Optional) To view the actual depot location of the selected streams in the Stream Graph, from the
Label list, select Stream Root.
The full depot path appears in the stream node for each stream:
This is useful if you have parent streams with child task streams that are located in other depots.
9. (Optional) To change the size of the stream node to accommodate long depot paths, move the
Width slider.
10. (Optional) Click the navigator icon to open the Graph Navigator.
The Graph Navigator allows you to navigate the Stream graph when it is too big to fit into the
available display area. In the Graph Navigator window, the red rectangle indicates the portion of
the graph that is currently displayed in the Stream graph. You can use your mouse or cursor keys
to move the rectangle and shift focus in the Stream graph.
Note
The navigator icon is only available if the Stream graph is larger than the display area.
Work in a stream
To work in a stream or switch from one stream to another, do one of the following:
130
Branching with Streams
Note
If you have set your stream operations preference in the Preferences dialog to use the same
workspace when you switch between streams — or you are using P4Sandbox — then P4V
does not prompt you to switch workspaces. Instead the workspace view changes to include
the stream you are switching to.
n Drag the workspace icon from the stream you are currently working in to another stream.
When you switch streams this way, the workspace view changes to include the stream you are
switching to, no matter what you set as your stream operations preference.
Note
You can create task streams by creating a child stream from a parent, but you can also create
parentless task streams. For more information about how branch a task stream, see Working with
Task Streams.
1. In the Streams tab, right-click the stream and select Create New Stream from 'stream_
name'….
2. In the Stream: New dialog, define the new stream.
See "Creating new streams" on page 125.
3. Verify that the new stream appears correctly in the stream graph.
If you have specified the stream type correctly, more stable streams are displayed above the
parent and less stable streams below the parent.
You can also reparent streams that have already been branched. To reparent a stream, do one of the
following:
n In the Stream graph, drag the stream to the new parent stream.
n In the Streams tab (list or tree view) or the Stream Graph Tab, right-click the stream, select Edit
Stream 'stream_name' , and enter a new parent in the Stream dialog.
131
Merging down and copying up between streams
Note
You cannot reparent task streams.
Merge indicator:
Copy indicator:
The arrows are color-coded to indicate status:
For example, the following arrows above the dev-2.1M2 stream indicate that you must update it by
merging down from its parent, after which you can copy up changes to the parent.
When you double-click a stream in the Stream graph, a pop-up displays copy and merge information,
along with links to the Merge/Integrate and Copy dialogs.
132
Merge down
Merge down
To merge changes down to a less stable stream:
1. In the Streams tab, right-click the target stream and choose Merge/Integrate to target_stream…
or double-click and choose Merge changes.
When you merge down or copy up, you must be working in the target stream.
2. If prompted, select or create a workspace for the target stream.
The Merge/Integrate dialog is displayed. Verify that the correct source and target streams are
specified.
For more information about the Merge/Integrate dialog, see "Merging files between codelines" on
page 89.
3. (Optional) To specify how the merge is to be resolved, click Resolve and Submit.
To enable specific p4 resolve flags, click Advanced.
4. Click Merge.
If necessary, resolve the merges manually, then submit the resulting changelist.
Copy up
When you copy changes up to a more stable stream, you are propagating a duplicate of the less stable
stream.
To copy changes up to a more stable stream:
1. In the Streams tab, right-click the target stream, or double-click the stream and select Copy
changes.
If prompted, select a workspace for the target stream.
When you merge down or copy up, you must be working in the target stream.
2. In the Copy dialog, review the propagation information or refine the operation using the options on
the Filter, Submit, and Advanced tabs.
3. To propagate changes to the more stable stream, click Copy and submit the resulting changelist.
133
Deleting stream files and streams
Note
You cannot merge or copy changes to unrelated task streams.
P4V removes unmodified files from the stream but does not delete files with more than one revision so
that their edit history is preserved. Files deleted from the stream remain in client workspaces until the
next sync operation (Get Latest Revision option), which removes them. If deleted files have been
branched to a child stream, P4V generates new integration records to directly link the branched files in
the child stream to the files in the parent stream that they were previously indirectly related to.
Subsequently, P4V removes the stream spec, but only if the stream:
Note
With task streams, the unmodified files automatically go away when the stream spec does. For more
information, see "Delete and unload task streams" on page 139.
To delete a stream:
1. In the Streams view, right-click the stream you want to delete and select Delete Stream <stream
name>.
2. When prompted if you want to permanently delete unmodified files before deleting the stream:
a. Optionally, to also delete files that have been merged down multiple times from the parent
stream but have never been edited in this stream, select the check box.
b. Take note of the number of integration and revision records this action would delete.
c. Click Yes, delete files.
P4V permanently removes unmodified files (files with one revision) from this stream.
3. In the Delete Stream form, click Yes to confirm.
P4V removes the stream spec.
134
Working with task streams
Overview
Task streams are sparse and semi-private:
n When you first create a task stream, only the workspaces associated with that task stream can
see the files in the stream.
n When you submit changes to the task stream, the changed files are visible to users who are not
using the task stream, but that is all they can see.
The workspaces associated with the task stream remain the only ones that can see all files and
activity (such as checkouts and shelves).
A task stream is only visible in the depot tree pane if that task stream is populated, has a workspace, and
that workspace is the selected workspace.
The typical task stream workflow usually ends with the task stream being deleted or unloaded:
1. Create a task stream from a parent stream (although a parent is not required).
2. Populate the task stream.
3. Work on a new feature and submit the code.
4. Merge down changes from the parent stream to the task stream.
5. Copy your changes up.
6. Delete or unload the task stream.
You do not always have to delete or unload the task stream. For example, if you find yourself editing more
than half the files in your task stream, that stream will no longer provide any savings in server overhead or
metadata management activity. It can make sense then to convert your task stream into a regular
stream.
Using a task stream feels just like using a regular stream, with the following exceptions:
135
Create a task stream from a parent stream in the same depot
136
Create a task stream without a parent
n In the Streams tab, right-click on any white space in the Stream Graph and select New
Stream.
2. In the Stream:New dialog, define the new stream.
n Give the new stream a unique name. You cannot re-use task stream names, even if the
task stream has been deleted.
n On the Basic Settings tab, select a Stream type of task.
n Select the depot where the task stream will be located.
n Select the parent stream (in a different depot) from which the task stream will be branched.
See "Creating new streams" on page 125 for more information about the Stream:New
dialog.
3. Refresh the Stream Graph view to verify that the new task stream appears correctly.
n In the child stream’s depot, the parent stream and parent stream’s depot appear grayed out
under Graph View Options, and the task stream appears as normal.
When you select the child stream for viewing in the Stream Graph, it should appear as a
child within its parent stream and parent depot hierarchy and be decorated with the task
stream icon: .
n In the parent’s stream depot, the task stream appears grayed out under Graph View
Options, but you can still select it for viewing in the Stream Graph.
The task stream should appear as a child of its parent and be decorated with the task
stream icon: .
n When you are viewing the parent stream’s depot, you may want to see the actual depot
location of the child task stream in the Stream Graph:
l Select Stream Root as your Display stream option under Graph View Options. The
full depot path appears in the stream node for each stream:
l To change the size of the stream node to accommodate long depot paths, you can
move the Stream node width slider.
You can also select these display preferences in P4V > Preferences > Streams
(Mac) or Edit > Preferences > Streams (Windows).
137
Create a task stream without a parent
138
Convert a task stream to a regular stream
1. Right-click the task stream in the Streams tab and select Edit Stream 'stream_name'.
2. Change the Stream type to the regular stream type you want.
n Task streams with parents can convert only to release or development streams.
n A parentless task stream can convert only to a mainline stream.
n You cannot convert a task stream to a virtual stream.
3. Verify that the parent stream (if there is one) is in the same depot as the task stream to be
converted.
1. Right-click the stream in the Streams tab (in graph, tree, or list view)
2. Select Delete Stream 'stream_name'.
Unloading transfers infrequently-used metadata from the versioning engine’s database files to a set of flat
files in an unload depot. If you unload a task stream, you can reload it if you change your mind and want
to use it again.
To unload a task stream:
1. Right-click the stream in the Streams tab (in graph, tree, or list view).
2. Select Unload stream 'stream_name'.
139
Filter task stream files out of File History results
2. Select the Unloaded… icon in the filter pane to open the Unloaded Streams dialog, where you
can filter for and select unloaded streams to reload.
3. Right-click the stream and select Reload Stream.
1. Go to P4V > Preferences(Mac) or Edit > Preferences (Windows) and select Files and History.
2. Select Hide files/revisions from 'task' streams (when following branch, copy actions).
n Submit changes directly to a stream but do not want to sync all of the files in the stream view to
your workspace.
n Develop against the same stream but switch imported libraries, such as when you develop across
multiple platforms.
For example, let’s say you are working in a development stream whose view includes all of the files in the
apps directory:
If you want to work only on the contents of the p4admin folder, you might not want the burden of syncing
all of the files in the apps directory to your workspace. You cannot change the workspace view of the
development stream to exclude the folders you do not want; the workspace view is inherent to the
stream. You could create a child of the development stream that excludes the files you do not want, but
then you would be unable to submit your changes directly to the development stream; you would be
subject to an unnecessary merge-down/copy-up routine every time you submit. Instead, you create a
virtual stream as a child of the development stream that excludes all but the p4admin folder:
140
View virtual streams
exclude ...
share p4-qt/apps/p4admin/...
This gives you a virtual stream with the workspace view you want:
//depot/development/p4-qt/apps/p4admin/... p4-qt/apps/p4admin/...
When you submit changes to the virtual stream, those changes are submitted directly to its parent
development stream.
The streams graph shows no merge or copy indicators for virtual streams. Rather, the base parent of a
virtual stream carries the merge and copy indicators, because the actual merges and copies flow
between real streams. When you submit a change through a virtual stream, the copy up or merge down
arrows appear between the virtual stream’s base parent and the real streams that should be merged down
or copied up to. For example, if you submit a change to main through the admin-auth virtual stream,
merge arrows appear between the main stream and its real children:
141
Stream path behavior in virtual streams
n Share: in real streams, files included in share paths can be merged, copied, branched, synced
(retrieved) and submitted to the depot. In virtual streams, files included in share paths cannot be
submitted, merged, copied, or branched, since, by definition, virtual streams do not allow those
actions (submitting, branching, merging, and copying actually happen through the virtual stream’s
real parent).
n Isolate: in real streams, files included in isolate paths can be synced to your workspace and
submitted to the depot, but not branched, merged, or copied. In virtual streams, isolate
functions essentially like share , since virtual streams do not, by definition, allow submits,
branches, merges, or copies. This does not mean that there is no reason to use isolate when
creating a virtual stream, however; if you intend to create a real child from the virtual stream, the
files in the isolate path in the real child stream will behave according to expected isolate
behavior.
142
Create a virtual stream
n Import: in real streams, files included in import paths can be synced but not merged, copied,
branched, or submitted. In virtual streams, import behaves like share if your import paths
are importing from the real parent. However, if you import an explicit depot path from another
location, then typical import behavior occurs.
For example, let’s say your parent stream, //Acme/Main, includes the following file directory:
//Acme/Main/lib
When you define a virtual stream as a child of //Acme/Main, the following import path is
redundant, since it behaves just like a share:
share ...
import lib/...
The import path is superfluous, unless you intend to create real children from the virtual stream.
However, if you want to import libraries from an explicit depot location to your virtual stream, your
import path is necessary and functions just as it would for a real stream.
share ...
import lib/... //Red/R6.1/stuff/...
n Exclude: always behaves just as it does in real streams.
For more information about stream paths, see the section "Stream path" in the "Streams" chapter of the
Helix Core Server User Guide .
1. In the Stream Graph, right-click a stream and select Create New Stream from '<stream
name>'….
2. On the Basic Settings tab in the Stream dialog, select a Stream type of virtual - used to
narrow the scope and submit directly to the parent..
3. On the Advanced tab in the Stream dialog, enter the stream paths that define the scope of the
virtual stream.
4. Complete the stream settings just as you would any other stream.
5. Click OK.
Note
Just as you can create a virtual stream as the child of any stream type, you can also create a real
stream as the child of a virtual stream.
143
Submit changes to a virtual stream
For more information about using the Stream dialog to create or edit streams, see Creating Streams.
144
9 | Using P4V for distributed versioning
This chapter provides an introduction to Distributed Versioning via P4V.
Init
This section describes how to start up a personal server using Init. Use this approach if you want to
work in isolation on a personal server, developing and possibly branching code.
To initialize a personal server and set it up with everything needed to start versioning files, do one of the
following:
145
Read this first
146
Add files
n A stream depot
n An initial stream called main
n A workspace. Note that the client option allwrite is set by default, making files writable
without the need to check them out first.
Add files
At this point, you are ready to add files to your personal server. You can create, copy, and mark for add
your source files to be added to Helix Server and submit them. If you are new to P4V, see "Managing
files" on page 60.
Clone
Clone is a combination of two operations, Init and Fetch. Clone fetches the files specified in a
Remote Mapping and copies them to the new personal server. See "Understanding remote mappings" on
page 151 for more information on Remote Mappings. This approach is best when working collectively on
an existing project; users work on a set of project files that are managed on a remote server. They can
periodically push changes back to the shared server from which the files were cloned and also
periodically fetch to get the latest changes made by others to the shared server files.
You can perform a Clone operation from a remote server using any of the following methods:
n Connect P4V to a remote Helix Server. From the Depot Tree in the left pane, right-click a single
path you wish to clone.
With this option, P4V creates a remote mapping on the personal server, called ‘origin’, for the user
that maps to the selected path. There is an option to create or select a different remote mapping.
147
Prepare to fetch and push content between servers
Administrators can also use Fetch and Push to copy changelists between shared servers.
Fetch and Push are to the distributed versioning model what sync and submit are to the classic
Helix Server central server model.
Fetch copies the specified set of files and their history from a remote server into a personal server.
Push copies the specified set of files and their history from a local server to a remote server. Both are
atomic: either all the specified files are fetched or pushed or none of them are.
If Push fails after it has begun transferring files to the remote server, it will leave those files locked on
the remote server. The files cannot be submitted by any other user. If Push cannot be quickly retried,
you can connect to the remote server with another P4V window to manually unlock the affected files.
148
Configure security for fetching and pushing
When a DVCS repository is made via Clone or Init, the files in the repository (whether cloned, or
fetched from a remote) default to allwrite mode. This means the files may be edited without checking
them out.
If a file has been changed in allwrite mode, P4V treats it like an "offline edit" and will automatically
reconcile the change before running Fetch or Push. This means that the changes are submitted to the
repository before the Fetch or Push.
However, a file which is in a pending changelist (that hasn’t been submitted) must be submitted before
running Fetch or Push. If files are shelved, they should be unshelved and submitted, or deleted before
running Fetch or Push.
n The user name on the remote server must be the same as the user name on the local server. This
will be the case by default unless you have specified the Remote User field in the remote
server’s remote mapping.
n The user must exist on the remote server.
n The user must have read (Fetch) and write (Push) permission on the remote server.
n The server.allowpush and server.allowfetch configuration settings must be set
to On (they are Off by default) on both the remote server and the personal server.
n attributes
n any fixes associated with the changelists, but only if the job that is linked by the fix is already
present in the local server
Note
Zipping and unzipping files also copies attributes and fix records.
149
Resubmit
Resubmit
If there are file conflicts between the personal and remote servers when performing a fetch those
conflicts will enter a resolve/resubmit cycle. In the cycle, one or more conflicting files from the remote
and personal server are resolved, then the resolved files are resubmitted.
There is one resubmit for each affected changelist that is affected by the fetch.
The resolve/resubmit cycle is automated and can be completed without user interaction but if a file
conflict exists each cycle will require user interaction.
The Resubmit dialog will appear if the fetch has conflicts. At the top is a list of all of the affected
changelists along with their resubmit status. Below that list is the current changelist that is being
resolved.
The user can interrupt the resolve/resubmit cycle at any time by choosing “Finish Later”. It is highly
recommended that a user complete the cycle before performing any actions to affected files to minimize
potential data loss. P4V will reopen the resubmit menu if it has been restarted.
If a file needs to be resolved before resubmitted, the Resubmit dialog will provide an option to resolve the
file conflict. The P4V Resolve dialog will load prepopulated with the files associated in the current step of
the resolve/resubmit cycle.
The sense of the resolve for a DVCS Fetch with conflicts is the reverse of what might be expected.
When the Fetch brings down files from the remote server, all local files in conflict are moved to a
"tangent" depot residing on the local server. Moving files to the tangent depot is automatically done as
part of the Fetch process. For each changelist with conflicts, a new changelist containing changes from
the remote server replaces the old changelist that has been moved to the tangent depot. The "source" for
the resolve refers to the local files in the tangent depot. The "target" for the resolve refers to to the remote
files that have been moved to the local depot itself. For example, in P4Merge, the "source" is the local file
(say MyFile.c#7); the "target" is the remote file with conflicts (with no stated revision); and the "base" is
the common previous revision (say MyFile.c#6). If there’s any confusion, running P4Merge from the
Resolve dialog (by selecting the "Merge Tool" option) should clarify the sense of the "source" and "target"
of the resolve.
Branches
Branches within a Helix Server personal server are implemented as a stream. For more information on
Streams and Branching, please review "Working with streams" on page 115. The branch operation in
Streams is the same as the p4 switch operation. In P4V, branching will create a new Stream of type
main or development.
Users familiar with Helix Server streams: When connected to a personal server, the P4V Stream Graph
View will change streams-specific terminology to include git-related terminology. Example: a stream is
called a "Branch Stream". Switching streams is renamed to "Checkout Stream".
To view the branches of your personal server, open the Stream Graph View by selecting Streams View
(Ctrl+7) from the View menu. Under Graph View Options, make sure your stream(s) are selected, and
click Apply.
150
Understanding remote mappings
For more information on the Stream Graph View including information on the display conventions and
configuration, please see "Using the stream graph" on page 127.
To branch in P4V, from the Stream Graph View, right-click on the stream you wish to branch and select
Branch Stream.
When creating a new branch, files that have been modified in the current branch are shelved for
safekeeping. After switching back to an existing branch, P4V syncs your client workspace to the head of
the new branch and unshelves any files that were open in the default changelist the last time the stream
was used.
To change your workspace to a different branch either:
Note You cannot switch to a new branch if files are open in a numbered changelist. If files are open in the
default changelist, they will be shelved and reverted prior to switching to the new branch, and will be
automatically unshelved when switching back to thi
Note
You cannot switch to a new branch if files are open in a numbered changelist. If files are open in the
default changelist, they will be shelved and reverted, prior to switching to the new branch, and will be
automatically unshelved when switching back to this branch.
151
Understanding remote mappings
As depicted in the figure above, a remote holds file mappings between depot paths on the shared server
and depot paths on the personal server.
n For fetch and clone operations, it defines the files from the remote server that you want in your
personal server and specifies where you want them to reside.
n For a push operation, it defines the files from the personal server that you want in the shared
server and specifies where you want them to reside.
Remotes provide a convenient way to give you the exact files you need to work on a particular project.
You can simply clone from a shared server, specifying the remote id of the remote that maps the desired
files. These files are then copied to your personal server. Once they’ve cloned, you can Fetch to
refresh the files initially obtained with Clone.
Using remotes allows you to fetch a subset of all the files on the shared server. This is in contrast to other
distributed versioning systems, such as Git, which require that you fetch all files.
Note that when you clone a set of files from a shared server by specifying a remote, Helix Server creates
a new remote named origin and copies the remote into your local system. This remote will be used for all
future fetches.
There are two different scenarios in which remotes are created:
n You create a remote on a shared server so that other users can clone from this server and obtain
the files they need to work on a project. Note that to create a remote on a shared server, you must
have an access privilege of open or greater. While this task typically falls in the domain of an
administrator, it does not require administrator privileges.
n You — an individual user — create one or more remotes on your personal server so that you can
eventually push your work to and fetch files from one or more shared servers.
You would create a remote on a shared server to dictate which subset of the shared server’s repository a
personal server retrieves when it clones from the shared server. After cloning, you use the origin remote
on your personal server. You can then either edit the origin remote or create a different remote to control
which streams the personal server fetches and pushes.
152
10 | Integration with Swarm
Helix Swarm is a powerful and flexible code review and collaboration solution that helps teams ship
quality software faster. Swarm enables review of code and other assets before or after commit and can
be customized to fit into various workflows. Swarm stores all of its metadata (including Reviews,
Projects, and Comments) in Helix Server, which makes it an attractive solution because it does not
require backing up of an external database. For more about using and installing Swarm, see the Helix
Swarm Guide.
Review workflow
Following is the happy path workflow for a Swarm review. For more permutations and variations, see the
Helix Swarm Guide.
1. Make local changes to files: Swarm reviews can follow either a pre-commit or post-commit
workflow. In both models, the author would make some local content changes to one or more files
and then get those content changes into Perforce.
2. Request a review: For pre-commit code reviews, the Swarm solution uses Helix Server shelving
technology to get the content to Helix Server. For post-commit code reviews, content committed
to Helix Server is added to a review. In both cases, a Swarm review is created with an ID, a
description, a set of files, and other metadata, including the author, reviewers, and comments
made on the review.
3. Provide review feedback: Reviewers can comment on files or individual lines in files using
Swarm. They can also add follow-up tasks that the author should address before the review can
be closed.
4. Request revisions: If the reviewers find that the review needs more work, which is often the
case, they can change the state of a review to Needs Revision, thereby notifying the author that
the review is back in their court.
5. Request further review: Authors can request another round of review of their review content
changes and update any of the tasks they were asked to complete, thereby notifying the
reviewers that they are ready for more feedback.
6. Approve or reject review: Reviewers can approve or reject a review using Swarm. When they
approve or reject a review, the review is considered closed.
7. Commit the review: For pre-commit reviews, authors can commit reviews either using Swarm or
their Helix Server clients, such as P4V or P4VS. For the latter scenario, committing a pre-commit
code review is synonymous with submitting the changelist associated with the review.
153
Setting up the Swarm integration
Note
P4V uses a Swarm integration timeout, in seconds, to limit delays in the P4V user interface. The
timeout can be adjusted by running the following command:
p4 property -a -n P4.Swarm.Timeout -v 10
The default timeout value is 10 seconds. The timeout can be set for a specific user or a specific group
by including the -u username or -g group options, respectively.
Request a review
You can request reviews from either pending or submitted changelists. Note that a changelist cannot be
associated with more than one review. However, a review can have more than one changelist associated
with it.
Best practices:
154
Request a review
n Pre-commit code reviews are a more popular approach because they allow validating of code and
correcting defects before they become a part of the committed code base. Swarm supports pre-
commit code reviews via pending changelists.
n Post-commit code reviews allow reviewers to provide feedback on the submitted content, and
they allow the author to follow on with more submitted changes when making updates
recommended by the reviewers. Development branches are well-suited for the post-commit
review process.
Reviewers:
n When you select reviewers, you can make them required or optional.
n When you select a group as reviewer, you can make all members optional, all members required,
or decide that only one member of the group is required to review.
n If a user is specified as an optional reviewer, but the same user is also the member of a group of
which all members are required to review, then this user is actually a required reviewer.
1. Go to the pending changelist tab, right-click the changelist, and select Request New Swarm
Review.
Note
If the changelist is already part of a Swarm review, this option is not available.
155
Request a review
The Request New Swarm Review dialog displays a list of files to be shelved in order to request
the review. If the changelist already has shelved files, the dialog also lists these already shelved
files. The aggregate of the shelved files comprises the review.
2. In the Request New Swarm Review dialog, enter a description.
Each review requires a description. The default description is the changelist's description.
156
Request a review
3. Optionally, select additional options, including: reviewers (users or groups), reverting checked out
files after they are shelved, not shelving unchanged files, and opening the review in Swarm.
157
Request a review
Tip
It is a best practice that you, as the author, keep this pending changelist for subsequent updates to
the review. You can use this same changelist to submit the review. If the review is rejected or the
review is committed from Swarm, you should manually discard this pending change so that it does not
get accidentally committed.
1. Go to the Submitted changelist tab, right-click the changelist, and select Request New Swarm
Review.
Note
If the changelist is already part of a Swarm review, this option is not available.
The Request New Swarm Review dialog displays the files to be added to the review.
158
Update a review
Update a review
If you need to update the files in a review for any reason, such as to respond to the feedback you received
from the reviewers, P4V lets you update an existing Swarm review.
159
Update a review
1. On the Pending tab, right-click the changelist and select Update Swarm Review 'xxxx', where
xxxx is the review ID.
The Update Files in Review dialog displays a list of files to be shelved in order to update the
review. If the changelist already has shelved files, the dialog also lists these already shelved files.
The aggregate of the shelved files comprises the updated review.
2. If needed, update the review description.
160
Update a review
3. Optionally, select additional options, including reverting checked out files after they are shelved,
not shelving unchanged files, and opening the review in Swarm.
Option 2: Update from a pending changelist not associated with the review
To update a review from a pending changelist that is not yet associated with the review, do the following:
1. On the Pending tab, right-click the changelist and select Update Swarm Review.
This scenario is typical if you are working on a different machine than where you originally
requested the review or if you have discarded the original changelist you used for creating the
review. If you already have a changelist associated with the review, you would likely use that
changelist and follow the instructions in option 1.
161
Update a review
The Update Files in Review dialog displays a list of files to be shelved in order to update the
review.
162
Update a review
2. In the Update Review field, enter the ID of the review you would like to update with these files.
3. Optionally, to validate if this review is in fact the review you would like to update, click View
Review Description.
4. Optionally, select additional options, including reverting checked out files after they are shelved,
not shelving unchanged files, and opening the review in Swarm.
5. Click Update Review.
The changelist you used to update the review becomes associated with the review.
163
Update a review
The Add to a Swarm Review dialog displays a list of files to be added to the review.
164
Open a review in Swarm
2. In the Update Review field, enter the ID of the review to which you would like to add these files.
3. Optionally, to validate if this review is in fact the review to which you would like to add these files,
click View Review Description.
4. Optionally, select additional options.
5. Click Add to Review.
The files get added to the review.
165
Open a review in Swarm
1. In P4V, open the Go To Spec dialog with the keyboard shortcut of +G (+G on Mac).
166
Open a review in Swarm
167
Review ID and Review State columns
4. Select the pending changelist to which you want these files to be unshelved and click Unshelve.
P4V retrieves a local copy of these files into your workspace.
If you are connected to a Helix Server with the Swarm integration enabled and do not see the columns,
right-click the header row and select these fields.
168
Reconnect to Swarm
Reconnect to Swarm
If the connection to Swarm is interrupted, you can re-establish it from the Connection > Reconnect to
Swarm menu.
Note
This menu item is only available if the P4.Swarm.URL is defined.
169
Glossary
access level
A permission assigned to a user to control which commands the user can execute. See also the
'protections' entry in this glossary and the 'p4 protect' command in the P4 Command Reference.
admin access
An access level that gives the user permission to privileged commands, usually super privileges.
APC
The Alternative PHP Cache, a free, open, and robust framework for caching and optimizing PHP
intermediate code.
archive
1. For replication, versioned files (as opposed to database metadata). 2. For the 'p4 archive'
command, a special depot in which to copy the server data (versioned files and metadata).
avatar
A visual representation of a Swarm user or group. Avatars are used in Swarm to show involvement in
or ownership of projects, groups, changelists, reviews, comments, etc. See also the "Gravatar" entry
in this glossary.
base
The file revision, in conjunction with the source revision, used to help determine what integration
changes should be applied to the target revision.
170
Glossary
branch
(noun) A set of related files that exist at a specific location in the Perforce depot as a result of being
copied to that location, as opposed to being added to that location. A group of related files is often
referred to as a codeline. (verb) To create a codeline by copying another codeline with the 'p4
integrate', 'p4 copy', or 'p4 populate' command.
branch form
The form that appears when you use the 'p4 branch' command to create or modify a branch
specification.
branch mapping
Specifies how a branch is to be created or integrated by defining the location, the files, and the
exclusions of the original codeline and the target codeline. The branch mapping is used by the
integration process to create and update branches.
branch view
A specification of the branching relationship between two codelines in the depot. Each branch view
has a unique name and defines how files are mapped from the originating codeline to the target
codeline. This is the same as branch mapping.
broker
Helix Broker, a server process that intercepts commands to the Helix Server and is able to run scripts
on the commands before sending them to the Helix Server.
change review
The process of sending email to users who have registered their interest in changelists that include
specified files in the depot.
changelist
A list of files, their version numbers, the changes made to the files, and a description of the changes
made. A changelist is the basic unit of versioned work in Helix Server. The changes specified in the
171
Glossary
changelist are not stored in the depot until the changelist is submitted to the depot. See also atomic
change transaction and changelist number.
changelist form
The form that appears when you modify a changelist using the 'p4 change' command.
changelist number
An integer that identifies a changelist. Submitted changelist numbers are ordinal (increasing), but not
necessarily consecutive. For example, 103, 105, 108, 109. A pending changelist number might be
assigned a different value upon submission.
check in
To submit a file to the Helix Server depot.
check out
To designate one or more files for edit.
checkpoint
A backup copy of the underlying metadata at a particular moment in time. A checkpoint can recreate
db.user, db.protect, and other db.* files. See also metadata.
classic depot
A repository of Helix Server files that is not streams-based. The default depot name is depot. See
also default depot and stream depot.
client form
The form you use to define a client workspace, such as with the 'p4 client' or 'p4 workspace'
commands.
client name
A name that uniquely identifies the current client workspace. Client workspaces, labels, and branch
specifications cannot share the same name.
client root
The topmost (root) directory of a client workspace. If two or more client workspaces are located on
one machine, they should not share a client root directory.
172
Glossary
client side
The right-hand side of a mapping within a client view, specifying where the corresponding depot files
are located in the client workspace.
client workspace
Directories on your machine where you work on file revisions that are managed by Helix Server. By
default, this name is set to the name of the machine on which your client workspace is located, but it
can be overridden. Client workspaces, labels, and branch specifications cannot share the same
name.
code review
A process in Helix Swarm by which other developers can see your code, provide feedback, and
approve or reject your changes.
codeline
A set of files that evolve collectively. One codeline can be branched from another, allowing each set
of files to evolve separately.
comment
Feedback provided in Helix Swarm on a changelist, review, job, or a file within a changelist or
review.
commit server
A server that is part of an edge/commit system that processes submitted files (checkins), global
workspaces, and promoted shelves.
conflict
1. A situation where two users open the same file for edit. One user submits the file, after which the
other user cannot submit unless the file is resolved. 2. A resolve where the same line is changed
when merging one file into another. This type of conflict occurs when the comparison of two files to a
base yields different results, indicating that the files have been changed in different ways. In this
case, the merge cannot be done automatically and must be resolved manually. See file conflict.
copy up
A Helix Server best practice to copy (and not merge) changes from less stable lines to more stable
lines. See also merge.
173
Glossary
counter
A numeric variable used to track variables such as changelists, checkpoints, and reviews.
CSRF
Cross-Site Request Forgery, a form of web-based attack that exploits the trust that a site has in a
user's web browser.
default changelist
The changelist used by a file add, edit, or delete, unless a numbered changelist is specified. A
default pending changelist is created automatically when a file is opened for edit.
deleted file
In Helix Server, a file with its head revision marked as deleted. Older revisions of the file are still
available. in Helix Server, a deleted file is simply another revision of the file.
delta
The differences between two files.
depot
A file repository hosted on the server. A depot is the top-level unit of storage for versioned files (depot
files or source files) within a Helix Core Server. It contains all versions of all files ever submitted to
the depot. There can be multiple depots on a single installation.
depot root
The topmost (root) directory for a depot.
depot side
The left side of any client view mapping, specifying the location of files in a depot.
depot syntax
Helix Server syntax for specifying the location of files in the depot. Depot syntax begins with: //depot/
174
Glossary
diff
(noun) A set of lines that do not match when two files are compared. A conflict is a pair of unequal
diffs between each of two files and a base. (verb) To compare the contents of files or file revisions.
See also conflict.
donor file
The file from which changes are taken when propagating changes from one file to another.
edge server
A replica server that is part of an edge/commit system that is able to process most read/write
commands, including 'p4 integrate', and also deliver versioned files (depot files).
exclusionary access
A permission that denies access to the specified files.
exclusionary mapping
A view mapping that excludes specific files or directories.
file conflict
In a three-way file merge, a situation in which two revisions of a file differ from each other and from
their base file. Also, an attempt to submit a file that is not an edit of the head revision of the file in the
depot, which typically occurs when another user opens the file for edit after you have opened the file
for edit.
file pattern
Helix Server command line syntax that enables you to specify files using wildcards.
file repository
The master copy of all files, which is shared by all users. In Helix Server, this is called the depot.
175
Glossary
file revision
A specific version of a file within the depot. Each revision is assigned a number, in sequence. Any
revision can be accessed in the depot by its revision number, preceded by a pound sign (#), for
example testfile#3.
file tree
All the subdirectories and files under a given root directory.
file type
An attribute that determines how Helix Server stores and diffs a particular file. Examples of file types
are text and binary.
fix
A job that has been closed in a changelist.
form
A screen displayed by certain Helix Server commands. For example, you use the change form to
enter comments about a particular changelist to verify the affected files.
forwarding replica
A replica server that can process read-only commands and deliver versioned files (depot files). One
or more replicate servers can significantly improve performance by offloading some of the master
server load. In many cases, a forwarding replica can become a disaster recovery server.
Git Fusion
A Perforce product that integrates Git with Helix, offering enterprise-ready Git repository
management, and workflows that allow Git and Helix Server users to collaborate on the same
projects using their preferred tools.
graph depot
A depot of type graph that is used to store Git repos in the Helix Server. See also Helix4Git.
176
Glossary
Gravatar
gravatar.com is a third party service that you can subscribe to, gravatar enables you to upload an
image that you can use in Swarm. When configured, Swarm will attempt to fetch your avatar from
gravatar.com and use it within Swarm. If your avatar is not found on gravatar.com, Swarm will use
one of its own default avatars to represent your activity. See also the "avatar" entry in this glossary.
group
A feature in Helix Server that makes it easier to manage permissions for multiple users.
have list
The list of file revisions currently in the client workspace.
head revision
The most recent revision of a file within the depot. Because file revisions are numbered sequentially,
this revision is the highest-numbered revision of that file.
Helix Server
The Helix Server depot and metadata; also, the program that manages the depot and metadata, also
called Helix Core Server.
Helix TeamHub
A Perforce management platform for code and artifact repository. TeamHub offers built-in support for
Git, SVN, Mercurial, Maven, and more.
Helix4Git
Perforce solution for teams using Git. Helix4Git offers both speed and scalability and supports hybrid
environments consisting of Git repositories and 'classic' Helix Server depots.
iconv
iconv is a PHP extension that performs character set conversion, and is an interface to the GNU
libiconv library.
177
Glossary
integrate
To compare two sets of files (for example, two codeline branches) and determine which changes in
one set apply to the other, determine if the changes have already been propagated, and propagate
any outstanding changes from one set to another.
job
A user-defined unit of work tracked by Helix Server. The job template determines what information is
tracked. The template can be modified by the Helix Server system administrator. A job describes
work to be done, such as a bug fix. Associating a job with a changelist records which changes fixed
the bug.
job daemon
A job daemon is a program that checks the Helix Server machine daily to determine if any jobs are
open. If so, the daemon sends an email message to interested users, informing them the number of
jobs in each category, the severity of each job, and more.
job specification
A form describing the fields and possible values for each job stored in the Helix Server machine.
job view
A syntax used for searching Helix Server jobs.
journal
A file containing a record of every change made to the Helix Server’s metadata since the time of the
last checkpoint. This file grows as each Helix Server transaction is logged. The file should be
automatically truncated and renamed into a numbered journal when a checkpoint is taken.
journal rotation
The process of renaming the current journal to a numbered journal file.
journaling
The process of recording changes made to the Helix Server’s metadata.
178
Glossary
label
A named list of user-specified file revisions.
label view
The view that specifies which filenames in the depot can be stored in a particular label.
lazy copy
A method used by Helix Server to make internal copies of files without duplicating file content in the
depot. A lazy copy points to the original versioned file (depot file). Lazy copies minimize the
consumption of disk space by storing references to the original file instead of copies of the file.
license file
A file that ensures that the number of Helix Server users on your site does not exceed the number for
which you have paid.
list access
A protection level that enables you to run reporting commands but prevents access to the contents of
files.
local depot
Any depot located on the currently specified Helix Server.
local syntax
The syntax for specifying a filename that is specific to an operating system.
lock
1. A file lock that prevents other clients from submitting the locked file. Files are unlocked with the 'p4
unlock' command or by submitting the changelist that contains the locked file. 2. A database lock that
prevents another process from modifying the database db.* file.
log
Error output from the Helix Server. To specify a log file, set the P4LOG environment variable or use
the p4d -L flag when starting the service.
179
Glossary
mapping
A single line in a view, consisting of a left side and a right side that specify the correspondences
between files in the depot and files in a client, label, or branch. See also workspace view, branch
view, and label view.
MDS checksum
The method used by Helix Server to verify the integrity of versioned files (depot files).
merge
1. To create new files from existing files, preserving their ancestry (branching). 2. To propagate
changes from one set of files to another. 3. The process of combining the contents of two conflicting
file revisions into a single file, typically using a merge tool like P4Merge.
merge file
A file generated by the Helix Server from two conflicting file revisions.
metadata
The data stored by the Helix Server that describes the files in the depot, the current state of client
workspaces, protections, users, labels, and branches. Metadata includes all the data stored in the
Perforce service except for the actual contents of the files.
MPM
Multi-Processing Module, a component of the Apache web server that is responsible for binding to
network ports, accepting requests, and dispatch operations to handle the request.
nonexistent revision
A completely empty revision of any file. Syncing to a nonexistent revision of a file removes it from
your workspace. An empty file revision created by deleting a file and the #none revision specifier are
examples of nonexistent file revisions.
180
Glossary
numbered changelist
A pending changelist to which Helix Server has assigned a number.
opened file
A file that you are changing in your client workspace that is checked out. If the file is not checked out,
opening it in the file system does not mean anything to the versioning engineer.
owner
The Helix Server user who created a particular client, branch, or label.
p4
1. The Helix Core Server command line program. 2. The command you issue to execute commands
from the operating system command line.
p4d
The program that runs the Helix Server; p4d manages depot files and metadata.
P4PHP
The PHP interface to the Helix API, which enables you to write PHP code that interacts with a Helix
Server machine.
PECL
PHP Extension Community Library, a library of extensions that can be added to PHP to improve and
extend its functionality.
pending changelist
A changelist that has not been submitted.
project
In Helix Swarm, a group of Helix Server users who are working together on a specific codebase,
defined by one or more branches of code, along with options for a job filter, automated test
181
Glossary
protections
The permissions stored in the Helix Server’s protections table.
proxy server
A Helix Server that stores versioned files. A proxy server does not perform any commands. It serves
versioned files to Helix Server clients.
RCS format
Revision Control System format. Used for storing revisions of text files in versioned files (depot files).
RCS format uses reverse delta encoding for file storage. Helix Server uses RCS format to store text
files. See also reverse delta storage.
read access
A protection level that enables you to read the contents of files managed by Helix Server but not
make any changes.
remote depot
A depot located on another Helix Server accessed by the current Helix Server.
replica
A Helix Server that contains a full or partial copy of metadata from a master Helix Server. Replica
servers are typically updated every second to stay synchronized with the master server.
repo
A graph depot contains one or more repos, and each repo contains files from Git users.
reresolve
The process of resolving a file after the file is resolved and before it is submitted.
resolve
The process you use to manage the differences between two revisions of a file. You can choose to
resolve conflicts by selecting the source or target file to be submitted, by merging the contents of
182
Glossary
revert
To discard the changes you have made to a file in the client workspace before a submit.
review access
A special protections level that includes read and list accesses and grants permission to run the p4
review command.
review daemon
A review daemon is a program that periodically checks the Helix Server machine to determine if any
changelists have been submitted. If so, the daemon sends an email message to users who have
subscribed to any of the files included in those changelists, informing them of changes in files they
are interested in.
revision number
A number indicating which revision of the file is being referred to, typically designated with a pound
sign (#).
revision range
A range of revision numbers for a specified file, specified as the low and high end of the range. For
example, myfile#5,7 specifies revisions 5 through 7 of myfile.
revision specification
A suffix to a filename that specifies a particular revision of that file. Revision specifiers can be
revision numbers, a revision range, change numbers, label names, date/time specifications, or client
names.
RPM
RPM Package Manager is a tool, and package format, for managing the installation, updates, and
removal of software packages for Linux distributions such as Red Hat Enterprise Linux, the Fedora
Project, and the CentOS Project.
183
Glossary
server data
The combination of server metadata (the Helix Server database) and the depot files (your
organization's versioned source code and binary assets).
server root
The topmost directory in which p4d stores its metadata (db.* files) and all versioned files (depot files
or source files). To specify the server root, set the P4ROOT environment variable or use the p4d -r
flag.
service
In the Helix Core Server, the shared versioning service that responds to requests from Helix Server
client applications. The Helix Server (p4d) maintains depot files and metadata describing the files
and also tracks the state of client workspaces.
shelve
The process of temporarily storing files in the Helix Server without checking in a changelist.
status
For a changelist, a value that indicates whether the changelist is new, pending, or submitted. For a
job, a value that indicates whether the job is open, closed, or suspended. You can customize job
statuses. For the 'p4 status' command, by default the files opened and the files that need to be
reconciled.
stream
A branch with additional intelligence that determines what changes should be propagated and in
what order they should be propagated.
stream depot
A depot used with streams and stream clients.
submit
To send a pending changelist into the Helix Server depot for processing.
184
Glossary
super access
An access level that gives the user permission to run every Helix Server command, including
commands that set protections, install triggers, or shut down the service for maintenance.
sync
To copy a file revision (or set of file revisions) from the Helix Server depot to a client workspace.
target file
The file that receives the changes from the donor file when you integrate changes between two
codelines.
theirs
The revision in the depot with which the client file (your file) is merged when you resolve a file
conflict. When you are working with branched files, theirs is the donor file.
three-way merge
The process of combining three file revisions. During a three-way merge, you can identify where
conflicting changes have occurred and specify how you want to resolve the conflicts.
trigger
A script automatically invoked by Helix Server when various conditions are met. (See "Helix
Versioning Engine Administrator Guide: Fundamentals" on "Using triggers to customize behavior")
two-way merge
The process of combining two file revisions. In a two-way merge, you can see differences between
the files.
185
Glossary
typemap
A table in Helix Server in which you assign file types to files.
user
The identifier that Helix Server uses to determine who is performing an operation.
versioned file
Source files stored in the Helix Server depot, including one or more revisions. Also known as a depot
file or source file. Versioned files typically use the naming convention 'filenamev' or '1.changelist.gz'.
view
A description of the relationship between two sets of files. See workspace view, label view, branch
view.
wildcard
A special character used to match other characters in strings. The following wildcards are available
in Helix Server: * matches anything except a slash; ... matches anything including slashes; %%0
through %%9 is used for parameter substitution in views.
workspace
See client workspace.
workspace view
A set of mappings that specifies the correspondence between file locations in the depot and the
client workspace.
write access
A protection level that enables you to run commands that alter the contents of files in the depot. Write
access includes read and list accesses.
186
Glossary
XSS
Cross-Site Scripting, a form of web-based attack that injects malicious code into a user's web
browser.
yours
The edited version of a file in your client workspace when you resolve a file. Also, the target file when
you integrate a branched file.
187
License statements
License statements
Perforce Software includes software developed by the University of California, Berkeley and its
contributors. This product includes software developed by the OpenSSL Project for use in the OpenSSL
Toolkit (http://www.openssl.org/).
188