0% found this document useful (0 votes)
28 views188 pages

P4V User Guide: September 2018

Perforce User Guide

Uploaded by

pinakin4u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views188 pages

P4V User Guide: September 2018

Perforce User Guide

Uploaded by

pinakin4u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 188

P4V User Guide

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

How to use this guide 9


Feedback 9
Other documentation 9
Syntax conventions 9
What's new in this guide for this release 10
1 | Introduction 11
About P4V, the Helix Visual Client 11
Basic concepts 11
Getting started with P4V 12
Checking for updates 12
2 | Using P4V 13
Connecting to Helix Server 13
Favorite connections 15
Connecting to unicode-mode Perforce services 15
Creating and managing workspaces 16
Create a workspace 16
Change your workspace 20
View workspaces 21
Search for workspaces 21
Delete and unload workspaces 21
Defining a Workspace View 22
Navigating P4V 23
Terminology 23
Layout 24
Update status information 24
Modify views 25
Using access keys and shortcut keys 25
About P4V icons 27
Bookmarking files 30
Bookmark a file or folder 30
Manage bookmarks 31
Using P4V shortcuts 31
Drag and drop 33

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

What's new in this guide for this release


Following is a summary of new information with links to the most prominent topics. For a complete list of
enhancements and bug fixes, see the Release Notes.

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.

About P4V, the Helix Visual Client 11


Basic concepts 11
Getting started with P4V 12
Checking for updates 12

About P4V, the Helix Visual Client


P4V, the Helix Visual Client, is the cross-platform graphical user interface for the Helix Core Server. You
can use P4V on Windows, Mac, and Linux computers and benefit from an identical interface regardless
of platform. To use the Helix Core Server to manage files, you typically connect to the Helix Server using
an application like P4V. P4V enables you to check files in and out, and perform various other versioning
tasks.

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:

The definitions for these terms are as follows:

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.

Getting started with P4V


To start using P4V, you must:

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)

Checking for updates


To see if P4V updates are available, go to Help > Check for Updates. If an update is available, a dialog
gives you the option to view the release notes and download it.

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.

Connecting to Helix Server 13


Favorite connections 15
Connecting to unicode-mode Perforce services 15
Creating and managing workspaces 16
Create a workspace 16
Change your workspace 20
View workspaces 21
Search for workspaces 21
Delete and unload workspaces 21
Defining a Workspace View 22
Navigating P4V 23
Terminology 23
Layout 24
Update status information 24
Modify views 25
Using access keys and shortcut keys 25
About P4V icons 27
Bookmarking files 30
Bookmark a file or folder 30
Manage bookmarks 31
Using P4V shortcuts 31
Drag and drop 33
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

Connecting to Helix Server


The first time you launch P4V, the Connection Setup Wizard (Mac: Connection Setup Assistant) runs
automatically. You can use the wizard to specify connection settings and create a user and workspace if
required. In subsequent P4V sessions, the Open Connection dialog is displayed by default. To run the
wizard/assistant manually, go to Connection > Set Up Connection​.
To connect to a Perforce service using a connection that you have used previously, do one of the
following:

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.

To connect to a Perforce service using a new connection:

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.

3. In the User field, enter your user name.


n To browse for a particular user, click the Browse…​ button and select the user from that
list.
n To create a user, click New…​ and fill in the appropriate information.
4. (Optional) In the Workspace field, specify the name of your client workspace.
n To browse for a particular client workspace, click the Browse…​ button and select the
workspace from that list.
n To create a client workspace, click New…​ and fill in the required information.
5. Click OK.
P4V connects to the specified Perforce service and displays a new instance of its main window.

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).

n To set connection-related environment variables, go to Connection > Environment


Settings…​ and specify the settings you want.
n To configure P4V to use environment connection settings at startup, go to Edit >
Preferences…​ and, on the Connections page, enable Open the connection that matches
your Perforce environment settings.
You can also click the Change Settings button on this page to set your connection-related
environment settings.

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.

Connecting to unicode-mode Perforce services


The first time you connect to a Unicode-mode Perforce service, P4V requires you to choose a character
set. If you are connecting to a Unicode-mode service, it is vital to configure this setting correctly to
ensure that files are transferred properly between your client machine and the Perforce service. If you are
unsure which setting to choose, consult your Helix Server administrator.
To configure a default encoding for Unicode-mode Perforce services, go to Edit > Preferences…​
(Windows) or P4V > Preferences…​(Mac) and open the Display page.
If you are connecting to a Unicode-mode Perforce service for the first time, P4V displays the Choose
Character Encoding dialog after you dismiss the Open Connection dialog. Specify the encoding you
want and click OK. The encoding that you specify overrides any default that is configured, and the
specified encoding is used when you subsequently connect to the same Perforce service.
Helix Server supports several variants of the UTF-16 character set, because the Windows, Mac, and
Linux platforms differ in their handling of UTF-16 encoding, specifically, in the ordering of multibyte
characters and the inclusion of a byte order marker (BOM) in the file header. The standard UTF-16
setting, utf16, is configured according to the typical defaults for your processor and is the
recommended setting, unless you are certain that your client computer requires different byte-order/BOM
settings.

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.

Creating and managing workspaces


A workspace specification defines the portion of the depot that can be accessed from that workspace
and specifies where local copies of files in the depot are stored. This location is called the workspace (or
client, in the P4 command line interface). A computer can contain multiple workspaces. A workspace is
required when connecting to a Perforce service if you intend to work with files. You can connect using
only host name and port, but you cannot exchange files unless you specify a workspace.
The mapping of depot files to local files is called the workspace view. If you are working with streams,
the workspace view is generated by Perforce, based on the structure of the stream. If the structure of the
stream changes, the workspace view is updated automatically. (In fact, you cannot manually edit the
view of a stream workspace.) If you use classic depots, you must define and maintain the workspace
view manually.
For more information about streams, see the "Streams" chapter in the Helix Core Server User Guide .

Create a workspace
To create a new workspace:

1. Do one of the following:


n Go to Connection > New Workspace​.
n Right-click a stream in the Streams tab and select New Workspace​.
n Right-click in the Workspaces tab and select New Workspace.
2. If the Workspace Name dialog opens, enter a name and click OK.

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

4. Map the workspace to the depot:


Classic depots: You can configure the workspace view (mappings) in the Workspace Mappings
field by doing one of the following:

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.

Owner The user who created the specification.

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.

Change your workspace


Classic depots:
You can switch your workspace using the Select Workspace dialog. Open the Select Workspace dialog
by doing any of the following:

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:

n Right-click a stream and select Work in this Stream.


n Merge or copy to a stream: you are prompted to switch to the target stream’s workspace.

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.

Search for workspaces


You can use filters to search for workspaces on the Workspaces tab and the Select Workspace dialog.
You can filter workspaces by any combination of the following:

n Owner: select current user or enter a user ID.


n Workspace Name
n Stream name

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.

Delete and unload workspaces


Deleting a workspace removes the Helix Server record of the workspace but does not remove files from
the workspace or depot. You cannot delete a workspace that has files checked out (open for edit) in P4V.
To delete 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
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''.

To reload an unloaded workspace:

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'.

For more information about unloading, see the P4 Command Reference.

Defining a Workspace View


The workspace view determines which portions of the depot are visible in your Workspace Tree and
where local copies of depot files are stored in your workspace. If you use streams, the workspace view is
generated and updated automatically. If you use classic depots, you must maintain the view manually,
as described in this topic.
To define or change your workspace view:

1. Go to View > Workspaces or click the Workspaces icon in th e toolbar.


2. In the Workspaces tab, right-click the workspace and select Edit Workspace.
3. In the Workspace form, edit the Workspace Mappings field.
You can define the view syntactically and graphically, as described below.
4. When you have finished editing, save your changes.

Syntactic view specification

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

Graphical view specification

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.

P4/P4Win term P4V term


Client Workspace

Sync Get revision

Open for edit Check out

Open for add/delete Mark for add/delete

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.

Update status information


P4V indicates file information and status using a set of icons and badges. To obtain updated status
information and refresh the display, P4V periodically queries the Perforce service. To force a refresh
operation, click .

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.

File list view


On the Files in Folder tab and the History tab (when viewing file history), use this icon to view files listed
by file name or as thumbnails.

Using access keys and shortcut keys


On Windows, you can use access keys to open menus and navigate the user interface. An access key is
an alphanumeric key that you can use instead of a mouse pointer to activate menu or dialog options. It
correlates to a designated character in a control label. Access keys are associated only with controls that
have text labels. In P4V, you can identify access keys by looking for underlined characters in labels.
To access a menu and to activate a control within a dialog box, you need to press ALT+<letter>. For
example:

25
Using access keys and shortcut keys

n To open the File menu, press ALT+F.


n To select the Latest revision option in the Diff dialog, press ALT+L.

Within a menu, you only need to press the <key> key. For example, to switch to the Depot Tree:

1. Press ALT+V to open the View menu.


2. Press D to switch to the Depot Tree view (if your current selection is the Workspace Tree).

In addition, shortcut keys allow more experienced users to quickly perform select actions. For example:

n To switch to the Depot Tree, press Ctrl+9.


n To switch to the Workspace Tree, press Ctrl+0.

Where applicable, P4V displays shortcut keys to the right of a menu label.
The following table lists common shortcut keys.

Action Shortcut Key


Show in Explorer Ctrl+Shift+S
Print Ctrl+P
Undo Ctrl+Z
Redo Ctrl+Y
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Select All Ctrl+A
Find Ctrl+F
Find File Ctrl+Shift+F
Go To Ctrl+G
View Depot Tree Ctrl+9
View Workspace Tree Ctrl+0
View Pending Changelists Ctrl+1
View Submitted Changelists Ctrl+2
View Branch Mappings Ctrl+3
View Labels Ctrl+4
View Workspaces Ctrl+5

26
About P4V icons

Action Shortcut Key


View Jobs Ctrl+6
View Streams Ctrl+7
View Remote Mappings Ctrl+8
Refresh All F5
Get Latest Revision Ctrl+Shift+G
Check Out Ctrl+E
Submit Ctrl+S
Revert Ctrl+R
Initialize Personal Server Ctrl+Shift+I
Fetch Ctrl+Shift+T
Push Ctrl+Shift+P
Lock Ctrl+Shift+L
Unlock Ctrl+Shift+U
Open Connection Ctrl+O
Open P4Admin Ctrl+Shift+A
Diff Against Ctrl+Shift+D
Show Revision Graph Ctrl+Shift+R
Show Timelapse View Ctrl+Shift+T
Open P4V Help F1
Show System Info Ctrl+I

About P4V icons


P4V uses a variety of icons and badges (decorations) to depict Helix Server objects and their status. The
following table describes commonly encountered icons.
P4V displays file icons in the Tree pane and throughout the user interface, with file status indicated as
shown in the following table. Note that file icons might be displayed with multiple "badges" (for example,
check marks, lock indicators), each indicating an aspect of the file’s status. This table does not list all
possible combinations. Note that red badges indicate actions taken by you, and blue badges indicate
actions taken by another user. To display a tooltip containing more details about a file’s status, hover the
mouse pointer over the file.

27
About P4V icons

Category Icon Description


Files File in depot

File in depot but not mapped by workspace view

File in workspace differs from head revision

File in workspace but not in depot

File synced to head revision

File synced to previous revision

File needs to be resolved

File locked by you

File locked by other user

File open for add by you (red "+")

File open for add in other workspace (blue "+")

File open for edit by you (red check mark)

File open for edit by other user (blue check mark)

File open for delete by you (red "x")

File open for delete by other user (blue "x")

File deleted in depot

28
About P4V icons

Category Icon Description


File open for rename/move ("+" indicates target)
File open for rename/move ("x" indicates source)
File open for branch

File open for branch by other user

File open for integrate (will need resolve)

File imported from another stream (cannot be submitted to current


stream)

Symbolic link

Changelists Shelved file in pending changelist

Pending changelist has files that need resolve

Pending changelist contains shelved files

Pending changelist has no open files

Pending changelist not associated with the current workspace or user,


with or without open files

Folders (Blue folder) A folder in the Helix Server depot

(Yellow folder) A folder in your client workspace

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

Category Icon Description


Remote depot: if configured by your Helix Server administrator, a
remote depot maps a portion of another Helix Server repository as if it
were a depot. Typically used to enable you to import and export third-
party files without providing outsiders with access to your Perforce
service.
Stream depot: A depot where stream files are stored.

Workspaces Workspace associated with a depot

Workspace associated with a stream

Swarm Pending changelist with shelved files in Swarm review


Empty pending changelist with shelved files in Swarm review
Submitted changelist with Swarm review

Folder History with Swarm review

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.

Bookmark a file or folder


1. In the depot or workspace pane, right-click the desired target file or folder. (P4V stores the location
using local or depot syntax, depending on whether you select the target in the workspace or depot
pane.)
2. Select Bookmark…​
The Bookmarks dialog is displayed.
3. Specify the bookmark as follows:
n Name: descriptive text to be displayed in the list of bookmarks
n Placement: the location of the bookmark in the displayed hierarchy of bookmarks
n Location: the path that specifies the location of the file or folder in the depot or workspace.
4. Click OK to dismiss the dialog and save your entries.

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.

Using P4V shortcuts


P4V supports the default shortcut keys listed below. You can also set up custom shortcuts. Go to P4V >
Preferences (Mac) or Edit > Preferences (Windows) and set up your shortcuts on the Shortcuts page in
the Preferences dialog.

Action Mac Windows


Display +0 +0
Workspace tab in
Tree pane

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

Display Depot tab +9 +9


in Tree pane

Select all objects +A +A

Copy text, path of +C +C


selected file or
folder, or contents
of selected
specification

Diff selected file +D +D

Check out file +E +E

Find +F +F

31
Using P4V shortcuts

Action Mac Windows


Close the current +F4 +F4
window

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

Print selected item +P +P

Revert selected +R +R
files

Submit selected +S +S
changelist

Display ++A ++A


Administration
Tool

Copy depot path of ++C ++C


selected file or
folder to clipboard

Get latest revision ++G ++G

Show in Stream ++M ++M


Graph

Display Revision ++R ++R


Graph of selected
file

Display Time- ++T ++T


lapse Display

Display revision +T +T
history of selected
file/folder

32
Drag and drop

Action Mac Windows


Unlock files +U +U

Paste text +V +V

Close the current +W +W


window

Cut text +X +X

Redo last edit +Y +Y

Undo last edit +Z +Z

Drag and drop


P4V supports drag-and-drop shortcuts for common tasks. To enable or disable drag-and-drop file
integration or diffing, go to P4V > Preferences (Mac) or Edit > Preferences (Windows) and set the drag-
and-drop options on the Behavior page.

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.

Searching and filtering


You can search for files, changelists, workspaces, branch maps, streams, jobs, and labels using filters.
Each of these has its own filtering procedure, but there are many shared search and filtering tools, which
are described here.

Find files in a depot or workspace


To find a file in the depot or in your workspace:

1. Go to Search > Find File…​.


2. On the Find File tab, under Search in, enter the directory path you want to search. You can drag
and drop the file path from the Depot or Workspace tree in the Tree pane.
3. Enter any of the following search criteria:
n Under Name matches any of the following, select an operator (contains, is, starts with,
ends with) and enter all or part of the file name. You can add multiple name match rows.
n Under Submission date or changelist, enter a date, changelist, or range of dates or
changelists.
n Select Include deleted depot files.
4. Click Find.
Click a file in the search results pane to view file details.

34
Find a file, folder, or item in the active tab

Find a file, folder, or item in the active tab


1. Click Search > Find or type +F (Windows) or +F (Mac).
2. Enter the search term in the Find dialog.
You can enter any part of a search term to retrieve results, unless you select Match whole word
only. To search in a different tab, you must close the Find dialog, go to the new tab, and reopen
the Find dialog for search.

Find specs using filters


You can use filters to find specific labels, submitted or pending changelists, workspaces, and so on.
These items are also referred to as' specifications.'
To enter filter criteria for most specification types:

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:

n To add conditions, click the plus button.

n To remove conditions, click the minus button.

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:

n For changelists, "Checking in files" on page 63


n For workspaces, "Creating and managing workspaces" on page 16
n For branch maps, "Managing branch mapping" on page 95
n For streams, "Using the stream graph" on page 127
n For jobs, "Managing jobs" on page 102
n For labels, "Managing labels" on page 98

Customize Depot and Workspace views using filters


You can apply filters to your Depot and Workspace views to hide or show certain files and folders.
To customize a tree view:

35
Customize Depot and Workspace views using filters

1. Do one of the following:


n Click Search > Filter Depot or Filter Workspace.

n On the Depot or Workspace tab, click the filter icon .


2. Select one of the following options:

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 Select to display only folders and files defined in


Workspace View the workspace

Entire Depot Tree Select to displays the whole depot tree

Tree Restricted to Click to open the list of depot types, and then
Depot Type select the depot type to display

No Folder Filter Select to clear a folder filter (only applies if you


have a bookmark selected)

<path to bookmarked Select to displays only the bookmarked folder and


folder> its subfolders in the depot tree

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

Show Hidden Files Select to display any hidden files

Do Not Show Hidden Select to keep hidden files from displaying


Files

Entire Computer Select to display the entire computer folder


hierarchy

Workspace Root Select to display only the workspace root

The tree view refreshes to reflect your selection.

36
Save and reuse filters

Save and reuse filters


To save a filter:

1. Open the Add Filter dialog by doing one of the following:

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.

To apply a saved filter:

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.

To manage your saved filters:

1. Open the Manage Filters dialog by doing one of the following:

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…​.

Filter with file paths


You can view jobs, changelists, or labels associated with particular files by entering the file path under
Files match any of the following file paths in the tab’s filter pane, or by using the File Path Builder.
You can enter either a depot or workspace file path.
To enter file paths directly into the Files match any of the following file paths field, do any of the
following:

n Use standard Helix Server file path syntax (//depot/folder/folder/filename or


//depot/folder/... ).
You can use the standard Helix Server wildcards (* and …​) and revision specifiers (@ and #).
For more information about wildcards and revision specifiers, see "Issuing P4 Commands" in the
Helix Core Server User Guide.

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.

To get help constructing a file path:

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.

Reconciling offline work


If for any reason you need to work offline, that is without having connectivity to Helix Server or without
checking out files, you can manually enable write permission for the files and continue editing, adding,
and deleting files as required.

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:

n To add conditions, click the plus button.

n To remove conditions, click the minus button.


b. Select the changelist that you want to add your changes to.
4. Click Reconcile to add the changes you selected in the dialog to the selected changelist.
5. Submit the changelist.

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:

1. Select File > Export to.


2. In the Select folder to export to dialog, specify the folder name and click Select Folder.

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:

n "Configuring P4V preferences" below


n "Editing user preferences" on page 57

Users with admin privileges can also set:

n Performance-related P4V properties centrally using a P4JSAPI centralsettings.js file.


For more information, see Administering P4V Settings Centrally in the Javascript API for Visual
Tools User Guide.
n Performance- and feature-related P4V properties globally by running the p4 property
command on the Helix Server. This method is reserved for users with admin privileges. For more
information, see Configuring P4V settings in Helix Core Server Administrator
Guide: Fundamentals.

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.

Configuring P4V preferences


To configure settings for P4V, do the following:

1. Go to Edit > Preferences​ (Windows) or P4V > Preferences​ (Mac).


The Preferences dialog includes the following configuration pages:

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.

Opening and closing connections:

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.

Drag and drop:

n Enable integration on directory-to-directory drag and drop: Launches the Merge/Integrate


dialog when you drop a folder on another folder.
n When dropping file(s):
l on a file, do a diff comparison: Launches the Diff dialog when you drop a file on another
file.
l anywhere within a changelist, move open files to new changelist:
l on a file, do nothing:

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:

Condition Command Available


Flags
Merge/Integrate Stream-to stream method p4 merge None

Merge/Integrate Branch mapping and Files and Folders p4 All


methods integrate
Copy Command available only with Helix Core p4 copy -v
Server 2011.1 and up

Branch Helix Core Server 2010.2 and earlier p4 -v


integrate
Branch Helix Core Server 2011.1 and up p4 None
populate

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.

Click Restore Defaultsto change the settings back to P4V’s defaults.


For more information about these options, see Merging Files Between Codelines.

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.

Click Restore Defaultsto change the settings back to P4V’s defaults.


For more information about these options, see Creating Branches.

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:

1. In the Shortcuts for drop-down, select the shortcut type:


n P4V
n Revision Graph
n Folder Diff
n Time-Lapse View
Only shortcuts for the selected window, viewer, or utility show in the shortcut list.
2. Click the Shortcut column for the command.
You may need to scroll the list window to the right to view the Shortcut column.
3. Enter the keyboard shortcut in the edit field.
Shortcuts must include either the command key, control key, or a function key
4. Click OK.

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

n Enable logging to file: Logs P4V activity to the specified file.


l Name: Specifies the name and location of the log file.
l Size: Specifies the maximum size of the log file in kilobytes (KB).

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).

Files and History


You can configure the way P4V displays files and file icons:

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:

n Merge, Copy and Branch Dialogs


n Set up Connection Assistant / Connection Wizard
n Sandbox Configuration
n Revision Graph
n Custom Tools
n Time-lapse
n Administration Tool

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. P4Merge: The P4V companion diff tool.


2. Other application: Browse to your preferred diff tool.
To specify arguments for third-party diff applications, enter %1 for the name of the first file and %2
for the name of the second file in the Arguments field. P4V replaces these placeholders with the
actual filenames when calling the diff application.

To assign diff applications by file type:

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. P4Merge: P4V’s companion merge tool.


2. Other application: Browse to your preferred merge tool.
To specify arguments for third-party merge applications, enter the following replaceable
parameters in the Arguments field:
n Base file: %b
n Their/Source file: %1
n Your/Target file: %2
n Result file: %r
P4V replaces these placeholders with the actual filenames when calling the merge
application.

To assign merge applications by file type:

1. Click Add.
2. Select a file extension from the drop-down list.

56
Applets

3. Enter or browse for the associated application.


4. Specify arguments for third-party merge applications in the Arguments field:
Enter the following replaceable parameters in the Arguments field:
n Base file: %b
n Their/Source file: %1
n Your/Target file: %2
n Result file: %r
P4V replaces these placeholders with the actual filenames when calling the merge
application.
5. Click Save.
The extension and associated application are displayed in the list of file type-application
associations.

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:

1. Select Allow Perforce applets to run in P4V.


2. Specify the Perforce services from which you are willing to accept Perforce applets:
n Enter the Perforce service name or host:port in the Server field.
n Click Add.
3. Click Advanced to specify the following settings:
n Save cookies from applets (Click Remove Cookies to delete all applet-generated
cookies)
n Allow applets to store data locally
n Manually configure web proxy used by applets for internet access: Enter the web
proxy address and port.
4. Click OK. Then click Apply.

Editing user preferences


To configure your user preferences, go to Connection > Edit Current User…​.
Use the Form tab to configure the following:

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.

Use the Reviews tab to select depot paths for review:

n Expand the tree to select a folder.


n Right-click the folder name to view a menu of inclusion choices:
l Include or Exclude Tree: include or exclude all files in all subfolders within the selected
folder
l Includeor Exclude Files: include or exclude all files in the folder but none within subfolders
l Include or Exclude Special…​: open the Special Edit of View Map dialog, where you can
specify filenames, extensions, or expressions written in standard Helix Server filter
expression syntax.
l Clear: clear your current review options for the selected depot folder. This option appears
only if you have already used the Reviews tab to select depot paths for review.
n Alternatively, you can double-click the folder name to go directly to the Special Edit of View Map
dialog, where you can specify filenames, extensions, or expressions written in standard Helix
Server filter expression syntax.

To change your password, go to Connection > Change Password…​.

58
Viewing effective settings

Viewing effective settings


If you want to view the settings currently in effect, do the following:

1. Select Help > System Info.


2. In the System Info dialog box, scroll down to the Application section, which lists all effective
settings, along with any disabled features.
If nothing is listed, the user's local P4V preferences are used.

Following is a sample Application section:

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:

p4 property -l -n P4V.Features // List enabled/disabled features


p4 property -l -n P4V.Performance // List performance-related settings

59
4 | Managing files
This chapter describes how to manage files using P4V.

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
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

Adding files to the depot


To add a file to the depot, you must perform two actions: (1) open the file for add, which places the file in a
changelist, and (2) submit the changelist, which copies the file to the depot.
To add a file to the depot:

1. In the Tree pane, click the Workspace tab.


2. Browse to the file you want to add.

If the file does not reside in the depot, its icon is unmarked ( ).

60
Retrieving files from the depot

3. Right-click the file and choose Mark for Add.

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.

Retrieving files from the depot


You can retrieve the most recent revision or any previous revision of a file from the depot to your
workspace. In the tree pane, open the folder containing the file you want to retrieve. The icons indicate
the status of the files; see "About P4V icons" on page 27 for details.
Expanding a file revision that resulted from an integration shows the revisions for the file in the source
codeline. Getting a revision from the source codeline does not affect the original file you are browsing.
To get the latest revision, right-click the file and choose Get Latest Revision.
To get a previous revision, right-click the file and choose File History. The History tab opens. This
tab displays the revision history of the file or folder selected in the tree pane. In the History tab, right-click
the desired revision and choose Get this Revision. Alternately, right-click the file and choose Get
Revision​. In the Get Revision dialog, specify the desired revision and click Get Revision.
To get the revisions or the previous revisions for files in a changelist, open the Submitted tab.
This tab displays a list of submitted changelists, based on the filter criteria selected at the top of the tab.
Its content is not related to any files or folders selected in the tree pane. In the Submitted tab, right-click
the desired changelist and choose Get Revisions For Files in Changelist <xxx> or Get Previous
Revisions for Files in Changelist <xxx>.
To use a changelist number, label, workspace, or date to specify a revision, in the Get Revision
dialog, click Specify revision using, choose the desired method from the drop-down list, and specify
the desired changelist number, label, workspace, or date. Then click Get Revision.

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:

n Marked for delete, they are reinstated in the client workspace.


n Marked for add, they remain in the client workspace.
n Merged or integrated, they are removed from the client workspace.
n Renamed or moved, only the file marked for add as part of the move operation can be reverted.

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

1. Select one of the following:


n One or more folders in the Depot or Workspace tree
n One or more files in the Depot or Workspace tree
n A pending changelist on the Pending tab, or one or more files within a changelist
2. From the Actions menu, select one of the following:
n Revert If Unchanged (for files) or Revert Unchanged Files (for folders and changelists)
to revert only files that have not changed (in terms of content or filetype) since they were
opened.
The only files reverted are those whose workspace revisions are the following:
l Open for edit but have unchanged content and unchanged filetype.
l Open for integrate and have not yet been resolved.
l Open for add but are missing from the workspace.
Files open for add that are missing but that also have pending integrations will not be
reverted.
n Revert (for files) or Revert Files (for folders and changelists) to revert all changes.
3. If P4V detects any changes, the Revert dialog box opens:
a. Select the changes you want to revert.
b. If you also want to delete files that were open for add from the workspace, select the relevant
check box.
Otherwise, P4V removes the add request but keeps the file in the workspace.
c. To prevent the Revert dialog from opening when reverting files, select the relevant check
box.
d. Click Revert.
e. If you chose to delete files that were open for add from the workspace, click Delete Files to
confirm.

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.

To submit an existing changelist:

1. Go to the Pending tab.


2. Filter for and select the changelist by double-clicking it.
3. In the Submit dialog, enter a description, select files, and (optionally) attach jobs.

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.

To edit the description of a submitted changelist:

1. Right-click the changelist and choose Edit Submitted Changelist.


2. In the Submit dialog, edit the description.

Note
Only the submitter of a changelist can edit its description.

To move all files from one pending changelist to another:


Right-click the changelist and select Move All Files to Another Changelist.
To move a file from one pending changelist to another:

1. Expand the source changelist.


2. Do one of the following:
n Drag the file to the target changelist.
n Right-click the file or files and select Move to Another Changelist.

Reverse a changelist submission


You can restore the state of a file or folder as follows:

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.

For details, see "Undoing changes" on the facing page.

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

Restrict access to a changelist


By default, all users can view a pending or submitted changelist, regardless of whether they are permitted
access to the files in the changelist by the protections table. To restrict who can see a changelist, select
the Restrict Access to Changelist option when editing a pending or submitted changelist.
Visibility of restricted changelists is as follows:

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.

Configure changelist display


To minimize the time it takes P4V to handle very large changelists, limit the number of files displayed in a
changelist by doing the following:

1. Go to P4V > Preferences (Mac) or Edit > Preferences (Windows).


2. Click Server Data.
3. In the Maximum number of files displayed per changelist field, enter the number of files to
display in a changelist.

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.

P4V restores file state as follows:

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

submission in the P4V User Guide for version 2017.2.

To perform an undo operation:

1. Select one of the following:


n A folder in the Depot or Workspace tree
n A file in the Depot or Workspace tree
n A file revision on the file's History tab
n A submitted changelist on the Submitted tab
2. From the Actions menu, select Undo Changes.
3. In the Undo Changes dialog, if needed, specify whether you want to undo a single change, a
range of changes, or all changes from a selected point forward.
4. Depending on your selection in step 3, specify a revision, changelist, date/time, or label, or a
range of the same.
5. Specify whether to check out the changes to a new or existing changelist.
6. Optionally, to inspect the file affected by the changes, click Preview.
7. Do one of the following:
n Click Save to Changelist to integrate the changes to be undone into the specified
changelist without submitting them just yet.
n Click Submit to check out the files as specified and immediately submit them. This opens
the Submit Changelist dialog box.
By default, the changelist description in the Submit Changelist dialog box displays a
comment similar to the following: "Undo <path to file or folder> to revision 3."
Click Submit again to submit the changelist containing the files.
P4V submits the changes.

Displaying revision history


This section explains how to view the revision history of a file, folder, or changelist. For information on file
revisions in labels, see "Retrieve file revisions in a label" on page 101
P4V displays a file's revision history, including integration and label history, on the History tab. This tab
works in conjunction with the Depot or Workspace tree. P4V gets all file revisions for the file path or
directory selected in the tree, up to the selected changelist. If a file revision is currently in your
workspace, it is indicated with a red box: .

Files
To display a file’s revision history:

68
Folders

1. Select a file in the Depot or Workspace tree.


2. Do one of the following:
n From the View menu, select History.
n Right-click and choose File History.
The History tab opens, listing the revision history for the selected file.

From here, you can:

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:

1. Select a folder in the Depot or Workspace tree.


2. Do one of the following:
n From the View menu, select History.
n Right-click and choose File History.
The History tab opens, listing the revision history for the selected folder.

From here, you can:

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:

1. From the View menu, select Submitted Changelists.


P4V opens the Submitted tab, listing submitted changelists.
2. Do one of the following:
n To get the revision of all files in a changelist: Right-click the changelist and choose Get
Revisions for Files in Changelist <xyz>.
n To get the revision of all files in multiple changelists: Right-click the selected changelists
and choose Get Revisions for Files in Changelists.

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.

Changing a file’s type


Helix Server file types determine how a file is stored in the depot and synced to the workspace, and
whether it can be diffed.
To change a file’s Helix Server file type (or other storage attributes):

1. Right-click the desired file and choose Check Out.


The file is checked out.
2. Right-click the file and choose Change Filetype…​.
The Change Filetype dialog is displayed.
3. Set the desired type and attributes and click OK to dismiss the dialog.
4. Submit the changelist containing the file.

For details about file types and attributes, see "File Types" the in the P4 Command Reference.

70
Renaming and moving files or folders

Renaming and moving files or folders


To rename or move a file or folder using P4V, you select the Rename/Move option on the object. You can
also rename and move a file or folder in one operation.
To rename a file or folder:

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.

To move a file or folder from one location to another:

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.

Cleaning up files and directories


To clean up the file system objects that are not under control of Helix Server or to restore workspace files
to match the state of corresponding depot files, you can select the Clean option on a folder.

Warning
Changes performed by the Clean option are permanent. You cannot revert this operation.

To clean files and folders:

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

n Depot files that are missing from your local workspace


2. By default, all files are selected for cleanup. If there are any files that you do not want to clean up,
clear the respective check boxes.
3. By default, files and directories listed in P4IGNORE files are excluded from cleanup and remain
unaffected. If you do want to include such files, clear the Apply P4IGNORE files for this
workspace check box.
In this case, P4V compares your workspace to the depot again and then also lists applicable files
that were previously excluded in the respective section.
4. Click Clean.
5. In the Confirm Deleting and Reverting Files dialog, click Continue to confirm the operation.

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. Right-click the file and choose Mark for Delete.


When you mark the file for delete, it is placed in a changelist.
2. Submit the changelist containing the file.

Diffing files and folders


To diff two files or file versions:

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.

To diff two folders:

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.

To diff two folder revisions:

1. Right-click the folder and choose Folder History.


2. In the Folder History pane, click and drag one revision to the other.
P4V launches the Folder Diff Utility.
Alternative: you can right-click the folder, select Diff Against…​, and select the folder revisions
you want to diff in the Diff dialog.

To diff two labels:

1. In the depot pane, select the topmost meaningful path.


2. Right-click and choose Diff…​. The Diff dialog is displayed.
3. For each of the two Path fields, click Specify revision and specify the labels you want to diff.
4. Click Diff. The folder diff utility displays the differences between the labels.
Shortcut: To launch a diff from the Labels pane, drag onelabel to another.

Diff dialog options


n Path: the two folders or files you want to diff.
If you choose Workspace version on local disk, you can ensure that all files in the workspace
(including files within the client mapping that are not under Helix Server control) are displayed by
using local syntax. To display only files under Helix Server control, use depot syntax.
n Workspace version on local disk: the file revision in your client workspace, including any
changes you made after retrieving it from the depot and editing it.
n Latest revision: the revision that was most recently submitted to the depot (the head revision).
n Have revision: the revision you most recently retrieved.
Does not include any edits you made after retrieving it from the depot.

73
Check workspace consistency

n Specify revision: enables you to designate the desired revision using a revision number,
changelist number, date, label, or workspace.

Check workspace consistency


If you need to reconcile your workspace after working offline, see "Reconciling offline work" on page 38.
To detect common inconsistencies between the files in your workspace and those in the depot, you can
diff your workspace with the depot by selecting the folders of interest.
When diffing folders, the folder diff utility enables you to detect problems such as:

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:

n Unmapped or remapped files and directories


n Files and directories that were retrieved to the workspace and subsequently removed from the
client view
n Files and directories that exist in the local workspace but are not in the current client view

To prevent or correct disparities that arise from changes to your client view, retrieve the affected files
(choose Get Latest Revision).

View the state of the depot at a specified point in time


When you choose Specify revision, the corresponding pane displays the state of the depot at the
specified date, changelist number, or label. This feature enables you to view the depot structure at that
time without retrieving files, similar to P4Web’s Back in Time Browsing.

Diff large files


To ensure correct results when comparing files that exceed 50,000 lines, you need to set the
diff.sthresh configurable to be greater than the number of lines being diffed. By default, this
configurable has a value of 50,000.

Note
This setup requires P4V and P4Merge 2015.1 or later.

74
Shelving files

To set the diff.sthresh configurable using the P4ENVIRO environment setting:

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.

Shelve checked-out files in a pending changelist


1. Right-click the changelist and select Shelve.
P4V displays the Shelve dialog.
2. Select the files you want to shelve and click Shelve.
3. Select any of the following options that apply:
n Revert checked-out files after they are shelved: Reverts the files in your workspace to
the head revision in the depot. By default, when this option is selected, P4V also removes
any files that are marked for add in the changelist from the file system when they are
shelved. If you do not want P4V to remove these files from the file system when they are
shelved, make sure to clear the Remove files that are opened for add check box.
n Don't shelve unchanged files: Only shelves files that have changed.
n Make shelf globally accessible: Promotes shelved files from an edge server to a commit
server, where it can be accessed by other edge servers participating in the distributed
configuration. Once a shelved change has been promoted, all subsequent local
modifications to the shelf are also pushed to the commit server and remain until the shelf is
deleted.
4. When prompted, enter a description and click OK.
P4V shelves the file in the selected changelist (or, if you are shelving files in the default
changelist, creates a new changelist).

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:

1. Right-click the file changelist choose Unshelve…​.


P4V displays the Unshelve dialog.
2. Check the files you want to unshelve and click Unshelve and any other desired options.
The shelved file is copied to your workspace and opened in the specified 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.

1. Select the Map unshelved files checkbox on the Unshelve dialog.


2. Select the way you want to map the unshelved files to the target branch:
n Using Branch Mapping: Enter the branch mapping you want to use, or browse for it.
You can use any branch mapping that maps the branch the file was shelved in as either
source or target. Your current workspace view must be mapped to the target.
n Using Stream: Type or select the stream you want to use to unshelve.
The stream must be the child in relation to the location of the files being unshelved. For
example, if the files are shelved in a mainline and you want to unshelve into a development
child, you must select the development child. Likewise, if the files are shelved in the
development child and you want to unshelve into the mainline, you must select the
development child. This still holds true if you reuse your workspace across streams. If you
are working in the mainline and shelve some files, then move your workspace to the
development child, you must still specify the development child stream to unshelve.

Submit shelved files


As of Helix Server 2013.1, you can submit shelved files directly.

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.

Delete shelved files


Shelved files remain shelved until you delete them from the pending changelist. To delete a shelved file
from a pending changelist, right-click the file and choose Delete. Alternately, right-click the pending
changelist and choose Delete Shelved Files​.

77
5 | More file management tools
This chapter describes P4V’s advanced file management tools.

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
Merging files 87
Additional codeline management tools are described in "Managing codelines" on page 88.

Viewing codeline history in the revision graph


The Revision Graph displays file integration history, showing when a file was added, branched, edited,
merged, copied, or deleted.
To launch the Revision Graph, right-click a file or folder in the Depot pane, Workspace pane, or
Revision History dialog and select Revision Graph.

Read the revision graph


Each revision of a file is represented by a shape. The shape denotes the action that created the revision.
For example, the following shape indicates that the revision was created by branching the file:

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.

Navigate the revision graph


To select revisions, click them or use the arrow keys. Details about the selected revision are displayed
in the lower right-hand pane. To select multiple revisions, control-click (Windows) or command-click
(Mac) them.
For files that have a large history, the Revision Graph displays a portion of the graph in its main window
and a map of the graph in the lower left Navigator tab. A box in the Navigator tab outlines the portion
displayed in the main window.
To navigate the diagram, do one of the following:

n Drag the box inside the Navigator pane.


n Use the scrollbars in the main window pane.
n In the main window pane, use the mouse wheel or middle button.

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.

Filter the revision graph


To reduce the detail displayed in the main window pane, you can filter the information:

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

in the following figure.

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.

Viewing file history with Time-lapse View


Time-lapse View provides an interactive graphical representation of a file’s history, showing when lines
were added, changed, and deleted, who made the changes, and when the changes were made. Time-
lapse View enables you to browse forward and back through changes dynamically, enabling you to locate
changes of interest. Detail panes at the bottom of the window provide more information about selected
chunks.

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.

To control the display, use the following settings and features.

80
Toolbar

Toolbar
Mode Determines how many revisions are displayed. Options are:

n Single revision: one revision at a time is displayed


n Incremental diffs: two adjacent revisions are displayed, with changes
highlighted
n Multiple revisions: a range of revisions is displayed, with changes
highlighted

Content Specifies the starting and ending revision displayed.


range

Scale Specifies the unit used: changelist number, date, or revision number.

User Toggles display of the user that made the change.

Aging Displays color coding to indicate how recently a change was entered. The darker the
shading, the more recent the change.

Line Toggles display of line numbers.


numbers

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.

Direct Display file revision history without reference to branching history.


history

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.

Find Search text

Go to line In single revision mode, go to specified line number.


number

81
Slider

Go to Next Go to next change.


diff

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.

Mode Slider Description


Appearance
single Move it to the right to display the next file revision or left to
revision display the previous revision.

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.

Viewing image file history with Time-lapse View


Time-lapse View for images provides an interactive graphical representation of an image file’s history,
showing changes, who made the changes, and when the changes were made. Time-lapse View enables
you to view changes as a slideshow or browse forward and back through changes dynamically. Detail
panes at the bottom of the window provide more information about selected revisions.
For information about Time-lapse View for non-image files, see "Viewing file history with Time-lapse
View" on page 80.
You can view the following image file types in Time-lapse View:

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 access Time-lapse View for images:

1. Right-click the image file and select Time-Lapse View.


2. In the Time-lapse Image Range dialog, select how many file revisions you want to view.
You can select a defined number of the most recent revisions; a range of revisions defined by
revision number, changelist number, or date/time; or all revisions. You can also tell the system to
remember your choice as the default to avoid being prompted again.
3. Click OK.

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

Enables or disables tweening effects, which generate intermediate frames between


each image to give the appearance of a smooth transformation from one image to
another.

Autoplay Select to stop or start a slideshow presentation of the image revisions.

Rotate Specifies the time between image revisions during Autoplay.


images
every
seconds

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

Using the folder diff utility


To display the differences in the contents of two folders, you can diff them. For example, after working
offline, you can diff your workspace with the depot to determine how to submit your changes so that your
workspace and the depot are consistent. To display the changes made to a folder over time, diff two
versions of the same folder. The Folder Diff utility offers show/hide options that enable you to list only
files of interest.
To diff folders:

1. Select two folders in the depot or workspace pane.


You can also select one folder and enter the second folder directly in the Diff dialog.
2. Right-click and select Diff Against.
3. In the Diff dialog, specify the paths and versions of the folders you want to compare.
4. Click Diff to launch 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)

Differences are highlighted as follows:

Violet highlight indicates content difference in file or subfolder.

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):

Show file pairs with identical content

Show unique files, with no counterparts in the other folder

Show file pairs with content differences

Filter for the files that are displayed


Click to select a saved filter or to create a filter using the Filter dialog. You can
filter by filename (or part of a filename) and folder path. For more information
about P4V filters, see "Searching and filtering" on page 34.

Go to previous or next diff

Show files in a tree hierarchy

Show files as list

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 text files


P4V lets you compare text files and image files to navigate their differences. To do a diff on the selected
files, P4V launches P4Merge. The purple icon ( ) is associated with the first file you selected, and
purple bands highlight text that is in the first file but not the second file. The green icon ( ) is associated
with the second file you selected, and green bands highlight text that is in the second file but not the first
file.
By default, P4Merge displays diffs in a side-by-side layout. However, you may prefer to view changes
closer to each other. In this case, you can switch to single-pane layout. To display diffs in a single pane,
go to View > Single Pane Diff Layout. In single-pane mode, deleted text is shown using strike-through
text.

To toggle the display of line numbers, click .


For more information, see Navigate diffs in the P4Merge User Guide.

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:

1. In P4V, right-click an image file and choose Diff Against​.


2. In the Diff dialog, specify the other image and click Diff.

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

1. In P4V, right-click the image file and choose File History.


2. In the History tab, select the revisions you want to compare, right-click, and select Diff Selected.

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.

Merging files between codelines


To create a new codeline (referred to as branching) or propagate a bug fix or new feature from one
codeline to another, you integrate the required files to the target codeline. To integrate files, you open
them for integration, specifying source and target, then submit the changelist containing the open files.
P4V performs three types of integration:

n Branching, which creates a new codeline or branch.


For more information, see Creating Branches.
n Merging, which propagates change from one existing codeline to another and prompts you to
resolve any conflicts between the codelines
n Copying, which is reserved for propagating a straightforward duplicate of the files in one codeline
to another.
For more information about copying, see Merging Down and Copying Up between Streams.

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:

1. Open files for merge.


2. Submit the changelist.
If there are conflicts, P4V notifies you and schedules the files for resolve.
3. Resolve the files, deciding how changed files are to be submitted.
4. Submit the changelist containing the resolved files.

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).

Open files for merge


To open files for merging:

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

4. To specify additional merge options, click the Options disclosure triangle.


The Options panel appears.
Specify integration options as follows:
Resolve and Submit Options: These options enable you to specify whether files are submitted
manually or automatically, and to configure how conflicts are resolved.
Filter Options: Filtering enables you to choose a subset of the revisions that are queued for
merging. For more information, see Searching and Filtering.
Advanced Options: These options enable you to refine the results of the merge as follows:
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 Enable baseless merges (-i): Perform the integration even if source and target share no
common ancestor, using the most-recently-added revision of the source file as the base.
n Try to integrate changes when source deleted and re-added (-Di): If the target file has
been deleted and the source file 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 Schedule 'branch resolves' (-Rb): Schedules a branch resolve, instead of branching new
target files automatically.
n Schedule 'delete resolves' (-Rd): Schedules a delete resolve, instead of deleting target
files automatically.
n Skip 'cherry-picked' selected revisions (-Rs): Skips cherry-picked revisions that have
already been integrated. This option can improve merge results, but can also require
multiple resolves per file.

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.

5. To perform the merge, click Merge.


The specified files are opened for merge using any options you configured.
6. Resolve and submit the files.

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

displays a question mark badge.


When you attempt to submit a changelist containing a file that must be resolved, the Submit Changelist
form displays instructions and the Submit button is grayed out. If the dialog says Out of date and there is
a yellow triangle badge on any file, get the latest revision of that file by right-clicking it and selecting Get
Latest Revision. This will not overwrite the copy of the file that is in your workspace. After you have the
latest revision, you can resolve the file. You can resolve files individually or attempt to resolve multiple
files at once.
You can resolve conflicts resulting from content changes, filetype changes, attribute changes, moves,
deletes, and branching.

Resolve individual files


To resolve an individual file:

92
Resolve individual files

1. Right-click the file and select Resolve…​.


2. The Resolve dialog opens in interactive mode by default.
If the file requires multiple resolve types (if, for example, another user has checked in changes to
both the content and filetype since you checked the file out), you can select Auto resolve
multiple files, but the default is to Interactively resolve files one at a time. In this case, each
resolve type is listed as a separate row in the Files to resolve list.
For each file/resolve-type combination, P4V recommends an action, based on the differences and
conflicts in the file selected. This recommendation is followed by an explanation. The action
button for the option is highlighted in blue.
3. By default, P4V recognizes line endings and white space differences. If you want P4V to ignore
line endings or white spaces, select an option from the Line ending and whitespace options
list.
n Ignore Line Ending Differences: Ignores differences in line-ending convention
n Ignore Line Ending and White Space Length Differences: Ignores whitespace-only
changes (for example a tab replaced by eight spaces)
n Ignore Line Ending and All White Space Differences: Ignores whitespace altogether
(for example deletion of tabs or other whitespace)
If you select any of these options and the files differ by whitespace only, P4V resolves the files
using the text in the workspace file.
4. (Optional) For more information about the files being resolved, select an option from the list of
Additional Actions:
n Open File: Enables you to open either version of the file individually or the merged result
file in any editor.
n Diff: Enables you to diff the files with each other, with the base file, or with the merged
result.
n File History: Displays the revision history of either file.
n Time-lapse View: Displays the history of either file using the Time-lapse View tool.
n Revision Graph: Displays the codeline history of either file using the Revision Graph tool.
5. Select whether to Merge binary files as text when resolving content.
If you select this option, P4V treats binary files like text files and attempts a textual merge
between the source and target 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.

Resolve multiple files


To resolve multiple files at once, automatically:

1. Select the files, right-click, and select Resolve…​.


2. Select Auto resolve multiple files.
The Resolve dialog displays the Files to Resolve. As files are resolved, they are removed from
this list.
To limit the files being auto-resolved to a particular resolve type or file type, select the type from
the Select drop-down. This can be helpful when different resolve types might require different
auto-resolve actions, or when some resolve or file types require you to resolve them interactively.
For example, if your list of files to resolve includes both binary and text files, you might select the
text files for auto resolve and leave the binaries to be resolved interactively.
The dialog displays the number of selected rows immediately above the list.
3. By default, P4V recognizes line endings and white space differences. If you want P4V to ignore
line endings or white spaces, select an option from the Line ending and whitespace options
list.
n Ignore Line Ending Differences: Ignores differences in line-ending convention
n Ignore Line Ending and White Space Length Differences: Ignores whitespace-only
changes (for example a tab replaced by eight spaces)
n Ignore Line Ending and All White Space Differences: Ignores whitespace altogether
(for example deletion of tabs or other whitespace)
If you select any of these options and the files differ by whitespace only, P4V resolves the files
using the text in the workspace file.
4. Select whether to Merge binary files as text when resolving content.
If you select this option, P4V treats binary files like text files and attempts a textual merge
between the source and target files.

94
Managing branch mapping

5. Select a Resolve method:


n Safe automatic resolve (no merging): Accepts the source file (the file in the depot) if it
has the only changes. Accepts the target file (the file in your workspace) if it has the only
changes. Doesn’t resolve if both the source and target have changed.
n Automatic resolve (allow merging):Accepts the source if it has the only changes.
Accepts the target file if it has the only changes. Merges changes if both the source and
target have changed and there are no conflicts.
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 Automatic resolve (allow merging with conflicts):Accepts the source if it has the only
changes. Accepts the target file if it has the only changes. Creates a merged file if both the
source and target have changed, even if there are conflicts. Where there are conflicts, both
versions are included with text notations indicating the conflicts.
6. (Optional) Select Set as Auto Default to set your selections as the default for auto-resolving
multiple files.
7. Click Auto Resolve.
If you selected an auto resolve option that does not allow merges when there are conflicts, any
conflicts will prompt P4V to recommend that you resolve the files interactively one at a time.
8. (Optional) Repeat if you are auto-resolving multiple resolve types separately.
9. To check in the changes, submit the changelist that includes the resolved files.

To resolve multiple files one at a time (recommended when there are conflicts):

1. Select Interactively resolve files one at a time.


2. Follow the procedure described in Resolve individual files.

Managing branch mapping


In Helix Core Server, a codeline is a set of related files — for example, all the source code required to
build your software product. Copying an edit from one file set to the other is called merging or copying.
Copying a set of files to create a new codeline (or equivalent) is called making a branch or branching.
Branching is performed using the Merge/Integrate feature. You can perform simple branches using a file
mapping.
To ensure that complex branching is done in a controlled manner (for example, to prevent typographical
errors when entering target directories or to make sure that complicated branches are performed
correctly), you can create a branch mapping, which specifies the relationship between two codelines.
When you branch, you can use the branch mapping instead of a file mapping. Branch mappings are
displayed in the right pane on the Branch Mapping tab.

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.

Work with branch mapping


To create a branch mapping, choose File > New > Branch Mapping​ and enter the required
information. To prevent the mapping from being changed by other users, check locked. To confine
integration to closely related files, choose direct; to enable integration between distantly related files,
choose indirect.
Use the View field to reflect the relationship between source and target codelines. For example, to create
release 2 of Jam from the code in your main codeline, you might use the following view:

//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.

4. To make changes to the mapping, click Edit View.


The target must be a path that contains some or all of the paths identified in the branch mapping.
In other words, the target can be a subset of the path specified by the branch mapping.

97
Managing labels

5. On the Advanced tab, specify other options as needed:


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.
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.

1. Select a file and choose Actions > Label.


2. In the Label Files dialog, enter or browse for the label you want to use.
3. Click the Apply label to files radio button.
4. (Optional) Add files to the label or remove them by clicking the Add or Remove buttons next to the
Files/Folders field.
5. Choose whether to label the latest revision of the files or a specific revision.
You can specify a revision by revision number, changelist, date/time, workspace, or other label.
6. Choose whether to exclude deleted revisions of the files.
7. Click Label.

To remove a label from a set of files:

1. Select a file and choose Actions > Label​.


The Label Files dialog is displayed.

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.

Display and search for labels


To display the labels defined for the Helix Server depot to which you are connected, open the Labels tab
(click the Labels icon in the toolbar or go to View > Labels).
To search for labels, use the filter fields on the Labels tab. You can filter by any combination of the
following:

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.

Delete and unload labels


Deleting a label makes it unavailable for use and removes the label from files. 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 label, you can reload it if you change your mind and want to use it again.
To delete a label:

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'.

To reload an unloaded label:

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'.

For more information about unloading, see the P4 Command Reference.

Retrieve file revisions in a label


To retrieve a labeled file revision using the Get Revision dialog:

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.

Display files associated with a label


To display all files associated with a label, do the following:

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.

Add a job to a pending changelist


To add a job to a pending changelist: drag the job from the Jobs tab of the right pane to the Jobs field
of the changelist. You can also use the Link jobs to changelist field in the Submit dialog. Specify the
job status upon submitting the changelist.
You can configure P4V to populate changelists with jobs automatically by setting your P4V user
preferences. For more information, see Editing User Preferences.

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

Search for jobs


Search for jobs by opening the Jobs tab and entering filter criteria using standard Helix Server filter
expressions (whose syntax is similar to Unix regular expressions) or by using the Job Query Builder to
create queries. Search results appear in the window below the query fields and change automatically as
you modify your queries.
Click on a job to view details.

Search for jobs using Helix Server filter expressions


If you are comfortable using standard Helix Server filter expressions, enter a search query in the
Keywords or search query field. You can also click the drop-down arrow to view and select recent
queries.
Valid expressions include the following:

Syntax Description Example


word word word Words filter file mailbox
separated by
Displays jobs containing all of
spaces
the words "filter", "file", and
indicate that
"mailbox" in any of the job
the job must
fields.
contain all of
the words in
the string in
any of the job
fields to be
included in the
filter.
Equivalent to
the logical
operator
"and."
pass:[word word word] Displays jobs pass:[filter file
that contain mailbox]
any of the
Displays jobs containing the
specified
words "filter", "file", or
words.
"mailbox.
Equivalent to
the logical
operator "or."

103
Search for jobs

Syntax Description Example


^word Displays jobs filter ^file
that do not
Displays jobs that contain
contain the
"filter" and do not contain
specified
"file".
word. The
'not' (^)
operator
cannot be
used alone or
with the 'or'
operator (),
only with the
'and' operator
(& or space).
fieldname=value Displays jobs status=open
that include owner=edk
the specified
Displays open jobs owned by
value in the
edk.
specified
field.
^fieldname=value Displays jobs ^status=closed&
that do not subsystem=parser
include the
Displays unclosed jobs
specified
affecting the parser
value in the
subsystem.
specified
field. The 'not'
(^) operator
cannot be
used alone or
with the 'or'
operator (),
only with the
'and' operator
(& or space).

104
Search for jobs

Syntax Description Example


fieldname=value+* Displays jobs owner=**ed*
that contain
Displays jobs in which the
the specified
value of field "owner"
value in the
contains the substring "ed,"
specified
including such values as
field, including
"Ted," "Edk," and "Fred".
any
combination
of characters
in the position
of the asterisk
wildcard.
yyyy/mm/dd:hh:mm:ss Displays jobs 2000/02/12:08:30:00
that contain
Displays jobs that contain the
the specified
date February 12, 2000, 8:30
date, where
am.
"yyyy" is the
year
expressed in
four-digit
format and
"mm", "dd",
"hh", "mm"
and "ss" are
the month,
day, hour,
minute and
second,
respectively,
expressed in
two-digit
format.

For more information about Helix Server job query syntax, see "Defect Tracking" in the Helix Core Server
User Guide.

Search for jobs using file paths


You can view jobs associated with particular files by entering the file path under Files match any of the
following file paths or by using the File Path Builder. The file path you enter retrieves jobs associated
with changelists that include any of the files in the path. Any filter criteria that you or the Job Query
Builder enter in the Keywords or search query field serve to filter the search results further. You can
enter either a depot or workspace file path.

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:

n Use standard Helix Server file path syntax (//depot/folder/folder/filename or


//depot/folder/...). You can use the standard Helix Server wildcards (* and …​) and
revision specifiers (@ and #).
For more information on wildcards and revision specifiers, see "Issuing P4 Commands" in the
Helix Core Server User Guide.
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.

To get help constructing a file path, use the File Path Builder.

Search for jobs using the Job Query Builder


The Job Query Builder helps you to construct filter expressions interactively.

106
Search for jobs

1. Click the Construct a search query icon to open the Job Query Builder.

107
Search for jobs

2. Build a filter expression:


n Select Match criteria:
l 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.
l 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.
n Select a field, operator (contains, is, does not contain, is empty, etc) and value:

Some values are editable; others are predefined and can be selected from a drop-down list:

n To add conditions, click the plus button.

n To remove conditions, click the minus button.

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.

Configuring custom tools 110


Environment considerations 110
Add custom tools 110
Import and export tools 113
Launching P4V components from the command line 114

Configuring custom tools


You can add commands and folders to the Tools menu. The tools can then be accessed from the Tools
menu in P4V and optionally from context menus. For each custom tool, you can also create a shortcut.
You can export your custom tool definitions to a file from which other P4V users can import them.

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.

Add custom tools


To add custom tools to P4V:

110
Add custom tools

1. Choose Tools > Manage Custom Tools​.


The Manage Custom Tools dialog is displayed.
2. Click New and choose Tool…​.
The Add Custom Tool dialog is displayed.
3. In the Name field, enter the name of the menu item you want to appear on the Tools menu.
4. Use the Placement field to define where you want the tool to appear in the Tools menu. Select the
Add to applicable context menus check box if you want the new tool to be available in P4V
context menus.
5. Specify the application that you want to associate with this command in the Application field. To
browse to the application, click Browse. (You can drag and drop the application from an Explorer
or Finder window to the Application field.)

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

Notes about arguments:

112
Import and export tools

n Arguments must be separated by white space.


n To specify values containing spaces, double-quote them. For example:

"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.

Import and export tools


You can export the tools you’ve defined to an XML file that other P4V users can import. Likewise, you
can import tools that other P4V users have created.
To import tools:

113
Launching P4V components from the command line

1. Choose Tools > Manage Custom Tools…​


The Manage Custom Tools dialog is displayed.
2. Click Import tools…​
P4V displays the Read Custom Tools from a File dialog.
3. Enter the file name or browse to the file and click Open.
The Import Preview dialog is displayed.
4. Click Import.
The tool definitions are imported.

To export tools:

1. Choose Tools > Manage Custom Tools…​


The Manage Custom Tools dialog is displayed.
2. Click Export tools…​
The Export Preview dialog is displayed.
3. Select the tools you want to export and click Export.
The Save Custom Tools to a File dialog is displayed.
4. Enter a file name and browse to the location where you want to save the export file and click OK.

Note
On Windows, if a tool does not run, verify that the files that it opens have their extensions mapped to
the required application.

Launching P4V components from the command line


If you are a P4 command line client user who occasionally uses P4V for certain functions, like viewing
the Revision Graph or the Stream Graph, you can use P4VC, a command-line tool included with P4V that
enables you to launch discrete P4V components from the command line without having to open a full P4V
instance.
P4VC commands use options, arguments, and behavior that match the P4 command line client. For
more information about P4VC commands, type p4vc help in the command line.

114
8 | Working with streams
This chapter provides an introduction to Helix Server Streams and describes how to use them.

About streams 115


About stream views 118
Setting up streams 124
Creating new streams 125
Selecting streams 127
Using the stream graph 127
Merging down and copying up between streams 132
Deleting stream files and streams 134
Working with task streams 135
Working with virtual streams 140

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.

The mainline model


The mainline model of software configuration management defines a structure based on the stability of
the contents of the stream, from softest (unstable or experimental) to firmest (high quality, releasable).
Typically, the mainline is required to be fairly stable (for example, code must build), development
codelines less stable, and release codelines the most stable.

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.

Propagating change between streams


The primary principle of change propagation is merge down, copy up. The goal is to keep less stable
streams up to date with their more stable parent or child, so that when change is propagated from a less
stable stream to a more stable one, no work is overwritten. This approach keeps the resolve operation as
simple as possible. Perforce's merge/copy and resolve features are the means by which you propagate
change between streams. When you use streams, all changes are propagated between parent and child
streams. If you want to merge or copy between peer streams (for example, to merge another developer's
changes to your development stream), you must first reparent your stream (that is, edit the stream
specification and change the Parent field). This approach is a key benefit of streams: the ability to
configure the flow of change.
For more information, see "Merging down and copying up between streams" on page 132.

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.

There are two additional stream types with special characteristics:

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.

Stream hierarchy in the Stream Graph


In the P4V Streams tab, the Stream graph displays soft streams below the mainline and firm streams
above it. For example, the following diagram shows a typical software development structure, consisting
of a stable mainline, with experimental streams below it and release-quality streams above:
Figure 1. Basic stream structure for software development

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.

Terminology differences between command line client and


P4V
P4V Command
Description
Term Line Term
Stream Stream The top level under the depot where files in the stream are
Root stored.
Stream Name A descriptive name that you assign and which is displayed to
label the streams in the Stream Graph.

About stream views


To configure the files that a stream contains, you define the stream view (Stream dialog > Advanced tab
> Paths: field). The view is composed of a set of paths to which you assign path types that control their
behavior. Helix Server uses stream views to generate workspace views and branch views for you.
Mainline, development, and release streams are only visible in the depot tree pane if the stream is
populated.
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.

Stream path types


Stream views use the following path types:

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:

Path type Merge/Copy Branch Sync Submit


share Y Y Y Y
isolate N N Y Y
import N N Y N
import+ N N Y Y
exclude N N N N

Stream path syntax


The syntax for specifying stream paths is similar to Perforce depot path syntax, with the leading //depot
name and stream name removed. For example:
Depot path: //Ace/main/qa/...
Stream view path: qa/...
If you want your stream to be able to merge, copy, branch, and submit edits to qa, you'd include a share
path like this in the stream view:

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.

Inheritance between parents and children


Child streams inherit folder paths and behavioral rules from their parents. When we talk about inheritance
between parents and children, it helps to think in the following terms:

119
Examples

n Permissiveness: what actions (submit, sync, etc) are permitted on a path?


Path types are inherited from parent streams, and you cannot override the effects of the path
types assigned by parent streams. In other words, child streams are always as permissive or less
permissive than their parents, but never more permissive. For example, if a parent stream defines
a path as isolate, its child streams cannot redefine the path as share to enable integrations.
n Inclusiveness: what paths are included in the stream?
Since children cannot, by definition, be more inclusive than their parents, you cannot include a
folder path in a child that is not also included its parent. That means, for example, that you cannot
add an isolate path to a child if the folders in that path are not also included in the parent. In the
following example, the incorrectly defined Dev stream, which is a child of Main, contains an
isolate path that will not work, because it includes folders that are not included in the parent.
In order to isolate the config/ folder in the Dev stream, that folder has to be included as a share
or isolate path in Main:

Incorrect Correct
Stream: //Acme/Main Stream: //Acme/Main
Parent: none Parent: none
Paths: share apps/... Paths: share apps/...
share tests/... share tests/...
share config/...

Stream: //Acme/Dev Stream: //Acme/Dev


Parent: //Acme/Main Parent: //Acme/Main
Paths: share apps/... Paths: share apps/...
share tests/... share tests/...
isolate config/... isolate 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.

Share and import


Let's look at an example where software components are housed in three separate depots, // Acme,
//Red, and //Tango.
The Acme mainline is configured like this:

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.

Share, isolate, exclude, and import


Let's say that your team doesn't want to do actual development in the mainline. In this example, the
XProd feature team has a development stream of their own, defined like this:

Stream: //Acme/XProd
Parent: //Acme/Main

121
Examples

Paths: import ...


isolate apps/bin/...
share apps/xp/...
exclude tests/...
Switching your workspace to the //Acme/XProd stream gives you this view:

//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.

Child that shares all of the above parent


Let's suppose that Bob, for example, creates a child stream from //Acme/XProd. His stream spec
looks like this:

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.

To create the mainline stream:

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.

To populate your mainline stream:

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.

Creating new streams


To create a stream:

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.

2. In the Stream dialog, specify the name of the stream.


By default, the name you specify is used as the name of the folder (under the stream depot folder)
in the depot where files in the stream are stored. To override the default folder name, go to the
Advanced tab.
3. Choose the stream type.
4. (Optional) If you require a flow of change that is different from the default for the stream type,
enable or disable the corresponding Change propagation option (To parent and From parent).

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:

/tmp # ignores files named "tmp"


/tmp/... # ignores directories named tmp
.tmp # itnores file names ending in .tmp

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.

Creating stream workspaces


To work in a stream, you must have a workspace for it. Helix Server generates the view (mapping of
depot locations to client locations) for any stream workspace, but you must initiate the creation of the
workspace. You can do so in the following ways:

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.

Using the stream graph


The Streams tab lists streams while the Stream Graph tab displays a graphical representation of the
relationships between parent and child streams in a selected depot.
To display streams in the Streams tab:

1. Go to View > Streams to open the Streams tab.


2. Select a display option by clicking the Show streams in list or tree icon :
n List displays the streams in a flat list.
n Tree (default) displays the streams in a hierarchy, with development streams and release
streams listed under mainline streams.
3. Search for streams or restrict the streams that are displayed by using the Filter pane at the top of
the tab. You can filter by owner, stream name, parent stream, stream type, and depot.
For more information about filters, see "Searching and filtering" on page 34.

To display streams in the Stream graph:

n Go to View > Stream Graph to open the Stream Graph tab.

127
Stream Graph display conventions

Stream Graph display conventions


The Stream Graph provides a graphical view of stream relationships and provides tools and shortcuts for
working with streams.
The graph uses location and color to depict stream types: mainline streams are gray and placed in the
middle of the graph, release streams are orange and appear above the mainline, and development
streams are blue and appear below.

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:

n Gray: no merge or copy required


n Green: a merge or copy operation is available
n Orange: stream must be updated, after which merge or copy is available

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.

Configure the stream graph display


1. In the Stream Graph tab, click the arrow icon at the top left to open the filter pane.
2. From the Depot list, select the depot that contains the streams you want to view.
3. If the depot contains more than one mainline stream, from the Mainline list, select the mainline
stream you want displayed in the graph. The field below the list populates with a tree view of the
selected stream.
The full depot path appears at the bottom of the filter pane and at the top of the Stream Graph tab,
next to the arrow icon.
4. (Optional) To focus on specific child streams, select them in the tree view.
You may need to expand the tree to view the streams you want to select. To access quick filter

options, click the filter list .

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

6. To save the Stream graph:

a. Click the filter list and select Save Graph As.


b. In the Add Stream Graph Filter dialog, enter a name for the filter and click OK.

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.

Display stream status


Double-click a stream to view a popup that contains status details:

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

n Double-click the stream and select Work in this stream.


A warning dialog pops up 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. The workspace icon appears on the stream you are now working in.

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.

Branching with Streams


To create a new development or release branch, you create a child stream from a parent. You can also
create virtual siblings of your mainline stream by branching.

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.

To create a child stream:

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.

Merging down and copying up between streams


Before changes made in a less stable stream can be copied up to its more stable child or parent, any
changes in the more stable stream must be merged down to the less stable.
In the Stream graph, 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:

n Gray: no merge or copy required


n Green: a merge or copy operation is available
n Orange: stream must be updated, after which merge or copy is available

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.

Propagate change between unrelated streams


To propagate change between streams that are not directly connected, click the Browse button on the
Merge or Copy dialog, then click the Display all streams link and choose the desired source.
You can also reparent a stream to create the relationship. To reparent a stream in the Stream graph, drag
the stream to the new parent stream.

133
Deleting stream files and streams

Note
You cannot merge or copy changes to unrelated task streams.

Deleting stream files and streams


Deleting a stream involves deleting the files and deleting the stream spec in two consecutive steps. P4V
executes both steps when you select to delete a stream, but technically, you can do one without the
other. If you delete only the files in a stream, the stream spec remains in the system. If you delete only
the stream spec, the files that were associated with that stream remain available in the depot.
You can only delete the files in a stream if:

n You are the owner of the stream.


n The stream is a development or release stream.

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:

n Does not have any children.


n Is not referenced by any workspace.

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

Working with task streams


Task streams are lightweight 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. They are ideal for developing small-to-medium
features and bug fixes.

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:

n Task streams do not require a parent stream.


This enables users who are not working in a stream depot to create task streams. The task stream
must reside in a stream depot, but that depot can be no more than a holding place for your task
stream. Contact your Helix Server administrator or project lead for information about the stream
depot to use. For more information, see "Create a task stream without a parent" on page 137.

135
Create a task stream from a parent stream in the same depot

n The parent can reside in another depot.


Task streams can quickly accumulate in a depot until they are deleted or unloaded. To keep a
project depot uncluttered by task streams, your Helix Server administrator or project lead may
choose to establish certain streams depots as dedicated holding places for task streams. In that
case, you create your stream in the task streams depot as a child of a parent in the project depot.
Even though the task stream resides in another depot, you can see it displayed in the Stream
Graph view of the parent’s depot. For more information, see "Create a task stream in a different
depot" below.
n Task streams cannot have child streams.
n Task streams cannot be reparented.
To reparent a task stream, you must first convert it into a regular stream.

Create a task stream from a parent stream in the same depot


1. In the Streams tab, right-click the parent stream and select Create New Stream from 'stream_
name'…​
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 Verify that the depot where the task stream will be located is the current depot and that the
parent stream is correct.
See "Creating new streams" on page 125 for more information about the Stream:New
dialog.
3. Verify that the new task stream appears correctly in the Stream Graph.
Refresh the Stream Graph view. You may need to select the task stream under Graph View
Options. The task stream should appear as a child of its parent and be decorated with the task
stream icon: .

Create a task stream in a different depot


1. Open the Stream:New dialog.
You can open the dialog by doing any of the following:
n Go to File > New > Stream
n In the Streams tab, right-click an existing stream and select Create New Stream from
'stream_name'​.

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).

Create a task stream without a parent


1. Open the Stream:New dialog.
You can open the dialog by doing any of the following:

137
Create a task stream without a parent

n Go to File > New > Stream.


n In the Streams tab, select the stream depot that will hold the new task stream, right-click
an existing stream, and select Create New Stream from 'stream_name'…​
n In the Streams tab, select the stream depot that will hold the new task stream, 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.
For a parentless stream this will usually be a stream depot that is dedicated to holding task
streams. Contact your Helix Server administrator or project lead for information about the
stream depot to use.
n Leave the parent stream field blank.
See "Creating new streams" on page 125 for more information about the Stream:New
dialog.
3. Verify that the new task stream appears on the Streams tab.
Parentless task streams do not appear in the Stream Graph, since there is no relationship to
display. You can view parentless task streams in the Streams tab using List or Tree view.
4. Populate the new task stream.
n Open the Branch dialog by right-clicking the task stream in List or Tree view on the
Streams tab and selecting Branch files…​.
n Whether you Specify source and target files or Use Branch Mapping, select the files
that you want to branch to your new task stream as your source and the new stream as
your target.
A parentless stream will not appear in the browse dialog for the Choose target files/folders
field. If you opened the Branch dialog by right-clicking the new task stream, it will appear in
this field by default. Otherwise, you must enter the full depot path manually.
n If you didn’t do so as part of the branching process, submit the changelist containing the
branched files.
For more information about the Branch dialog, see "Creating branches" on page 88.
You can also populate your new task stream using the Merge/Integrate dialog. For more
information, see "Merging files between codelines" on page 89.

138
Convert a task stream to a regular stream

5. Verify that the new task stream is populated.


n When you are working in the new task stream workspace, the files should appear in the
Depot view.
n When you get the latest revisions (sync) to your new task stream workspace, the files
should appear in the Workspace view.

Convert a task stream to a regular stream


Important
Once you convert a task stream to a regular stream, you cannot convert it back.

To 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.

Delete and unload task streams


You should always delete or unload a task stream after you are done with it. Your Helix Server
administrator may also run a batch process to delete or unload inactive task streams on a regular basis.
Note that any submitted files remain in the depot even after you delete a task stream. Note also that you
cannot re-use the names of deleted task streams.
To delete a task stream:

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'.

To reload an unloaded task stream:

139
Filter task stream files out of File History results

1. Display the Streams tab in List or Tree view.

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.

For more information about unloading, see the P4 Command Reference.

Filter task stream files out of File History results


To filter out file revisions that were submitted to task streams when you view file history:

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).

Working with virtual streams


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:

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

1. In the Stream editor, you select a stream type of Virtual.


2. In the Paths field, you enter stream paths that exclude all but the p4admin folder:

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.

View virtual streams


In the Streams Graph, a virtual stream is represented with a dashed border, and its relationship with its
base parent stream is represented by a gray line without merge or copy indicators. Virtual children of the
mainline are displayed next to the mainline. All other virtual streams are displayed above or below their
base parents, depending on whether their parents are development or release streams:

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

Stream path behavior in virtual streams


You use stream paths to define a virtual stream just as you do when you define a real stream. However,
the path types can behave differently. In particular, isolate and import can behave like share in
the context of virtual streams and may therefore be redundant when you define your virtual stream view:

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 .

Create a virtual stream


You can create a virtual stream as a child of any stream type — main, development, release, or another
virtual stream. The virtual stream takes the behavior of its parent stream type (that is, a virtual stream
created as a child of a main stream acts like a main stream, and a virtual stream created as a child of a
development stream acts like a development stream).

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.

Submit changes to a virtual stream


You submit changes to a virtual stream just as you would to a real stream, however the changes are
actually submitted to the virtual stream’s base parent.

Merge and copy to a virtual stream


You merge changes down or copy changes up to a virtual stream just as you would to a real stream,
however the merge or copy is actually submitted to the virtual stream’s base parent. You might find it
more straightforward to copy and merge directly between real streams.

144
9 | Using P4V for distributed versioning
This chapter provides an introduction to Distributed Versioning via P4V.

Understanding DVCS and setting up the server 145


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

Understanding DVCS and setting up the server


Before you start to work with distributed versioning, it is important to understand certain basic concepts
— including distributed versioning architecture and how servers relate to one another in this architecture.
Please refer to Using Helix Core Server for Distributed Versioning for information on the distributed
model.
The DVCS functionality of P4V allows users to create personal servers and submit changes locally
without the need to connect or set up a remote server. If the user wishes to clone, fetch or push assets
from a remote server, that server must meet the minimum version of 2016.2.1487173 and be set up to
accept DVCS commands.

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

n On the P4V toolbar, click Init.


n Click Connection > Open Connection. In the Open Connection dialog:
1. Select the Personal Server tab.
2. Click Initialize New Personal Server.

Before you continue, go to "Read this first" below.


For the command-line equivalent of Init, see Initializing a Server in Using Helix Core Server for
Distributed Versioning.

Read this first


The Unicode setting and case sensitivity check boxes should match those respective settings on the
shared server that will be fetched from and pushed to. If you are unsure what these settings are, the
following command-line command will return the pertinent information:

p4 -ztag -p <server> info


where <server> is something like “perforce:1666”. P4V 17.1 does not support the auto-discover option
for DVCS Init.

Directories and files


Init creates the following directories and files in the directory in which the command is invoked:
n .p4root - A directory containing the database files that will contain the metadata about files
checked into Helix Server

146
Add files

n .p4ignore - A list of files Helix Server should not add or reconcile


n .p4config - A file containing configuration parameters for the client-server connection
In addition, Init creates:

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

n Connect P4V to a remote Helix Server. On the toolbar, click Clone.


With this option, you must specify remote mapping information or create a new remote mapping.

Prepare to fetch and push content between servers


If you subsequently want to push your work to a shared server or fetch files from a shared server, you
must create a remote spec. See "Fetch and push" below and "Understanding remote mappings" on
page 151 for more information.

Fetch and push


Fetch and Push lie at the heart of a collaborative distributed workflow; they enable users to perform a
number of major tasks:

n To copy changelists from a personal server to a shared server


n To fetch changelists from a shared server that were pushed there by other personal servers
n To obtain and work with a subset of a shared server’s entire repository.
n To copy work between two personal 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.

Configure security for fetching and pushing


In order to Fetch and Push between servers, the respective servers must have authentication and
access permissions configured correctly:

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.

Specify what to copy


If the local and remote sides of the Depot Map pattern is modified to map differently within the Remote
Map, and a filespec or stream name is provided, then the filespec argument or stream name must be
specified using the personal server’s depot syntax. The filespec must always use depot syntax, not file
system or client syntax. For more information, see "Understanding remote mappings" on page 151.

What do Fetch and Push copy?


In addition to the specified set of files, the changelists that submitted those files, and integration records,
fetching and pushing to a server also copies the following:

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:

n Double-click the branch and select Work in this stream


n Right-click the branch and select Checkout Stream
n Drag the workspace icon from the stream you are currently working in to another stream

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.

Understanding remote mappings


A remote describes how depot files are mapped between a personal server and a shared server. A remote
spec — which describes a remote — is created by the user and has a unique name. A remote is used
with Push, Fetch, and Clone to describe source and target directories.
The following picture illustrates mapping depot files between a personal and a shared server:

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

Setting up the Swarm integration


To use the full list of features of the P4V integration with Swarm, you need to have Swarm 2014.4 or later
installed. The P4V integration also works with Swarm 2014.3, but some features, such as the required
reviewers option, are not visible. For details on how to set up the Swarm integration, see Configuring
Swarm connections in the Helix Core Server Administrator Guide: Fundamentals.
Example p4 property command to run:

p4 property -a -n P4.Swarm.URL -v https://swarm.yourcompanydomain.com


where https://swarm.yourcompanydomain.com is the URL for your Swarm server.
If you are testing the Swarm integration, you may wish to set the property for a specific user. For
example, to enable the Swarm integration for the user username:

p4 property -a -u username -n P4.Swarm.URL -v


https://swarm.yourcompanydomain.com
Similarly, you can enable the Swarm integration for a specific group of users. For example, to enable the
Swarm integration for the group group:

p4 property -a -g group -n P4.Swarm.URL -v


https://swarm.yourcompanydomain.com

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.

Swarm integration features


When Swarm integration is enabled, a number of additional features is available in P4V, including new
context menus, request review and update review dialogs, badging on pending changes, committed
changes, and history, as well as Review ID and Review State columns.

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.

Request a review from a pending changelist


To request a review from a pending changelist, do the following:

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.

4. Click Request Review.


The pending changelist is badged with a Swarm icon, and P4V updates the Review Id and
Review State fields with their values from 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.

Request a review from a submitted changelist


To request a review from a submitted changelist, to the folloing:

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

2. In the Request New Swarm Review dialog, enter a description.


Each review requires a description. The default description is the changelist's description.
3. Optionally, select additional options, including reviewers and opening the review in Swarm.

4. Click Request Review.


The pending changelist is badged with a Swarm icon, and P4V updates the Review Id and
Review State fields with their values from Swarm.

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

Update a Swarm review from a pending changelist


When updating a Swarm review from a pending changelist, the changelist can -- but does not have to be -
- already associated with the review.

Option 1: Update from an associated pending changelist


To update a review from a pending changelist that is associated with the review, do the following:

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.

4. Click Update Files.


The files in the associated review are updated.

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.

Update a Swarm review from a submitted changelist


To associate a submitted changelist with an existing Swarm review, do the following:

163
Update a review

1. Right-click the submitted changelist and select Add to Swarm 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.

Open a review in Swarm


If you leave the Open Review in Swarm check box option selected in the Review Request or Review
Update dialogs, P4V launches Swarm to the review page in your default browser. This serves as
confirmation that the review has been created or updated.

165
Open a review in Swarm

Getting Files from a Review


As a reviewer, you may be inspecting a review in Swarm and decide you need to get a local copy of the
files. The review ID shown in Swarm corresponds to a pending changelist in Helix Server that contains
these files. The simplest way to get these files from P4V is to use the Go To Spec dialog, as follows:

1. In P4V, open the Go To Spec dialog with the keyboard shortcut of +G (+G on Mac).

2. Enter the review ID and click OK.


P4V displays the Pending Changelist dialog.

166
Open a review in Swarm

3. Right-click the files you want to unshelve and select Unshelve.

P4V displays the Unshelve dialog.

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.

Review ID and Review State columns


P4V adds a Review Id and Review State column to the Submitted and Pending tabs and the History
tab for connections that have the Swarm integration enabled.

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).

atomic change transaction


Grouping operations affecting a number of files in a single transaction. If all operations in the
transaction succeed, all the files are updated. If any operation in the transaction fails, none of the files
are updated.

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

binary file type


A Helix Server file type assigned to a non-text file. By default, the contents of each revision are stored
in full, and file revision is stored in compressed format.

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.

modification time or modtime


The time a file was last changed.

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

integration, and automated deployment.

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

conflicting files, or by making additional changes.

reverse delta storage


The method that Helix Server uses to store revisions of text files. Helix Server stores the changes
between each revision and its previous revision, plus the full text of the head revision.

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.

symlink file type


A Helix Server file type assigned to symbolic links. On platforms that do not support symbolic links,
symlink files appear as small text files.

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.

text file type


Helix Server file type assigned to a file that contains only ASCII text, including Unicode text. See also
binary file type.

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

You might also like