Previous Table of Contents Index Next
Perforce 2012.3: P4Sandbox User's Guide



Chapter 4
This chapter discusses how to use a graphical client application for certain P4Sandbox tasks and provides examples for common scenarios. To perform these tasks, you must first configure a P4Sandbox; see Setting Up P4Sandbox.
P4Sandbox tightly integrates with P4V and uses this integration to work with P4Eclipse and other IDEs. This means that after you implement P4Sandbox with P4Eclipse, you use P4V to perform your P4Sandbox tasks. Consequently, this chapter focuses on using P4Sandbox with P4V. For more information on the P4V interface, see the P4V Online Help.
For more information on implementing P4Sandbox and P4V with other graphical client applications, see the online help that comes with your application or IDE Plug-in.
Starting a P4Sandbox
To start a P4Sandbox in P4V:
1.
Launch the P4V Open Connection dialog.
2.
Click Connections and select the P4Sandbox.
Enter the P4Sandbox Server, User, and Workspace information.
3.
Click OK. The P4Sandbox window opens with the workspace connected to the local stream, as shown in the figure below.
If the Streams tab is active but the Stream Graph does not appear, click the Show/hide filtering icon.
You can also connect to your P4Sandbox while logged into a shared service. Go to Connection > Open Recent, and select the P4Sandbox.
Working in a specific client write mode
The client write mode determines whether files are editable (allwrite mode) or read-only (noallwrite mode). To determine a workspace's client write mode, verify the status of the allwrite check box in the workspace description region. If the check box is clear, the workspace is operating in noallwrite mode.
To view and edit a workspace's client write mode:
1.
Go to View > Workspaces to open the Workspace tab.
2.
3.
Verify whether the allwrite check box is checked for the Option field of the workspace description region.
4.
Click the Edit button to launch the Workspace: <name> window.
5.
Click the Advanced tab.
6.
Check or clear the Allwrite check box in the File Options region.
Alternately, context-click a workspace to access a context menu that includes view and edit options.
For more information, see the following:
P4 User's Guide, "Configuring Workspace Options"
P4V Online Help, "Managing Workspace Specifications"
Understanding P4Sandbox Stream Graph elements
To display the mirror stream and local streams of the P4Sandbox in a P4V Stream Graph view, go to View > Streams.
The figure below shows a P4Sandbox Stream Graph, with the Depot and Streams views active.
A workspace icon (computer icon) in a stream indicates that the stream is tied to the current workspace. This is considered the active stream.
The arrow color indicates the following:
 
To successfully copy up changes, you must first perform any necessary merge downs. For specific instructions on these tasks, see the following sections:
In addition to the stream arrows, the Tasks field in the Dashboard tab shows pending tasks for the active stream. See Resolving pending tasks, below.
Verifying P4Sandbox streams workspace setting
Before you use P4Sandbox, confirm that P4V uses the same workspace when switching between streams.
To verify P4Sandbox's P4V streams workspace setting:
1.
Go to Edit > Preferences. The Preferences window appears.
2.
Select Streams.
3.
Confirm that the Use the same workspace and switch it between streams option is chosen. If not, select it.
4.
Using the context menus
Context-click a stream to access a menu of actions you can perform on a stream. A menu option's <name> field dynamically changes to indicate the active stream's name, such as mirror or local. You can access P4Sandbox context menus from the following locations:
Context-click a stream in the Depot tab to display a small menu of P4Sandbox actions.
The Stream Graph.
The Graph View Options window. To display this window, click the Show/hide filtering icon available from the Streams tab.
The table below shows the available menu options in their display order. Note that the small menu includes only the Merge/Integrate to <name>, Copy to <name>, and Branch options.
Displays the Stream: <name> window. View general stream settings and options information, such as stream name, root, and parent, owner, paths, and so on.
Click Edit to access the <name>: Edit window (see the Edit Stream <name> description). P4V displays a warning message when you attempt to edit a mirror stream.
Displays the Merge/Integrate window. For detailed field descriptions, see Merging down changes from the shared service.
Copy to <name>
Displays the Copy window. For detailed field descriptions, see Copying up changes to the shared service.
Displays the Branch window.
This window is similar to the Copy window; however, there are only two Branch method specification options.
Select to set a non-active stream as the active stream. An active stream has automatic shelving behavior.
Displays the Workspace: New page.
Displays the Stream: New page.
Edit stream characteristics on the Basic Settings and Advanced tabs.
Displays the Delete Stream Form window with the stream name marked for deletion.
This window is intended to confirm the stream deletion before the stream is actually removed.
Click Yes to delete the stream. This action cannot be undone.
Click No to cancel the deletion.
Note: Deleting a stream only deletes the stream specification, not any of the files that were in the stream. The files and their history remain in Perforce and continue to appear in the Depot view.
To hide deleted information in P4V, select the Hide Deleted Depot Files option in the Search > Filter Depot menu.
Displays the Diff window to compare differences between stream versions.
Displays the Folder Diff window to compare differences between files in two different folders and view detail, integration, label, and preview information for each individual file.
The window also provides the number of Unique files and File differences.
Displays the Label Files window.
Apply or remove a label from specified files or folders, and also set which revision to include or exclude.
Displays Preview of Stream <name> window, with a report of general stream setting information, such as name, parent, type, description, and so on.
Use the right-side Fields panel to set field display and default behavior.
Displays the Print window, to print a stream report.
When using P4Sandbox with both p4 and a graphical client application, use this command to refresh the Stream Graph after creating a new stream through p4.
When using P4Sandbox with both p4 and a graphical client application, use this command to refresh the Stream Graph after integrating changes in an existing stream through p4.
Merging down changes from the shared service
You must merge down changes from the shared service before you can copy up any changes from a P4Sandbox local stream.
To merge down changes from the shared service to the local stream:
1.
Context-click the local stream and select Merge/Integrate to ‘local'.
2.
The Merge/Integrate window opens, with default settings. Accept or change these defaults. The table below describes the available fields.
Because the Merge/Integrate window is dynamic, the available fields depend on the Merge method option you specify.
(Default) Select this option to enable P4V's automated logic to handle the merge details. The functionality automatically populates the Source stream and Target stream fields, as necessary.
Select this option if you require some control over the merge details. Specify a Source stream from which to merge or integrate files and a Target stream to receive the files. Optionally, click Save to define and create a branch mapping specification for future integrations.
Select this option if you require more control over the merge details; for example, if you are using a non-streams Perforce depot. Generally, most users should use the other two merge methods.
Click the arrow between Source and Target to reverse the branch integration direction.
(Default) Automatically adds files to a new changelist with a standard description and uses the Safe automatic resolve (no merging) option.
If you select the Automatically resolve files after merging check box, select a Resolve option value:
If you select the default Pending changelist option, you cannot enter a changelist description nor link jobs.
Automatically submit after resolving
Automatically submits files to a new changelist with a default changelist description, and also automatically resolves files after merging.
You can edit the Resolve option value.
Revision range and files/folders
For the Revisions to merge field, specify either:
Revisions up to, and limit the revisions copied by an available value.
Revisions to/from, and spec­ify parameters
You can filter to select specific changelists to use for the merge.
Available options depend on the Merge method you specify.
For information on these advanced merge and integration options, see the P4V Online Help topic "Merging Files Between Codelines."
Click to review the merge result before performing the merge.
Copying up changes to the shared service
When a stream that contains updated files that can be copied up to the mirror stream, the Stream Graph displays the following:
A Copy to Mirror link in the Tasks field of the Dashboard tab.
To copy files to the mirror stream:
1.
Click the Copy to Mirror (n change) link.
2.
The Copy window opens, with default settings. Accept or change these defaults. The table below describes the available fields.
As the Copy window is dynamic, the available fields depend on the Copy method option you specify.
If you are scripting an automatic update process, be sure to include logic to first validate the synchronization status of the shared service and mirror stream before copying changes from a local or task stream to the mirror stream.
(Default) Select this option to enable P4V's automated logic to handle the copy details. The functionality automatically populates the Source stream and Target stream fields, as necessary.
Select this option if you require some control over the copy details. Specify a Source stream from which to merge or integrate files and a Target stream to receive the files. Optionally, click Save to define and create a branch mapping specification for future integrations.
Select this option if you require more control over the copy details; for example, if you are using a non-streams Perforce depot. Generally, most users should use the other two copy methods.
Click the arrow between Source and Target to reverse the branch integration direction.
If you specify a new pending changelist with this option, you can one or both of the following actions:
If you specify the default changelist, you cannot do either of the above actions.
(Default) Automatically submits files to a new pending changelist; includes a default changelist description.
Saves your selected settings as the default copy options and displays them in the Current settings field until you define new settings.
Revision range and files/folders
For the Revisions to copy field, specify either:
Revisions up to, and limit the revisions copied by an available value.
You can copy by filtering on specific changelists.
Available options depend on the Copy method you specify.
For information on these advanced merge and integration options, see the P4V Online Help topic "Merging Files Between Codelines."
Adding a task stream
To create a task stream:
1.
2.
Select Create New Stream from ‘name'. The Stream: New window displays.
3.
4.
The Stream Graph displays the new task stream with the workspace icon. When you create a new task stream, P4V automatically sets it as the active stream.
Copying changes among task streams
To copy changes:
1.
In the Stream Graph, green arrows display between the stream containing the edited file and all affected child and parent streams.
2.
3.
The Copy window opens, with default settings. Accept or change these defaults. See the table in Copying up changes to the shared service, which describes the available fields.
Merging down changes between task streams
To merge down changes from a source stream to a target stream:
1.
Context-click the target stream and select Merge/Integrate to <name>. The Merge/Integrate window opens.
2.
Removing a task stream
To delete a task stream:
1.
2.
Select Delete Stream ‘name'.
Note the following exceptions:
You cannot delete a task stream that has any number of child streams. Either first delete the child, or assign it to a new parent using one of the following methods:
Edit the child's Basic Settings by context-clicking and selecting Edit Stream ‘name'.
Deleting a stream deletes its stream specification, and the Stream Graph does not display deleted streams. However, as the files, history, and changelists that occurred on that stream still remain recorded in Perforce, the streams are still visible in the Depot view.
Switching streams and shelving work
When you switch streams, P4V automatically shelves any open files in the inactive stream. Conversely, for an active workspace, P4Sandbox unshelves (checks out) any previously shelved files.
You cannot directly shelve a specific file or set of files when working in a graphical client application. P4Sandbox activates the automatic shelving behavior only when you switch streams.
To switch streams: Go to the Stream Graph view, select the workspace icon and drag it to the desired local stream.
To view shelved files: Click the Pending tab and expand the changelist that contains the shelved file.
Resolving pending tasks
The Dashboard tab's Tasks area displays hyperlinks to pending P4Sandbox tasks, in descending order of operation. P4V displays the following general P4Sandbox task categories (listed here in alphabetical order):
Merge to stream name
Promote to stream name
Click a hyperlink to manage the task. P4V displays the appropriate windows for you to complete the necessary action.
Closing a P4Sandbox connection
To close P4Sandbox in P4V, go to Connection > Close Connection.
Stopping a P4Sandbox
You cannot stop a P4Sandbox using a graphical client application; instead, you must use p4. For more information, see Stopping a P4Sandbox.
Deleting a P4Sandbox
You cannot delete a P4Sandbox using a graphical client application; instead, you must use p4. For more information, see Removing a P4Sandbox.
See also
See the following videos on the Perforce YouTube channel:
See also the P4V documentation at:
http://www.perforce.com/documentation/perforce_technical_documentation


Previous Table of Contents Index Next

Perforce 2012.3: P4Sandbox User's Guide
Copyright 2012-2013 Perforce Software.