|
|
Chapter 2
Configuring P4Win
|
Configuring client workspaces
|
|
Displaying client specifications
You can display client specification information as follows.
- Click
.
- Press F10.
- Choose View>ClientSpecs.
- Choose ClientSpec>View ClientSpecs.
To view a client specification, double-click its entry in the right pane. The client specification form is displayed, with users and files highlighted.
To display information about a highlighted file or user in a client specification, right-click the highlighted text and choose from the context menu as follows:
- Users: to display user information, choose Describe User...
- Email addresses: to email the addressee, choose Email.
- Files: to display file information, choose Properties. To locate the file in the depot, choose Find in Depot.
Creating client workspaces
To create a client workspace, you edit a Perforce client specification. The client specification controls which depot files are visible to a Perforce client application, and maps depot files to locations (directories) on the client computer.
To create a client specification:
- Choose ClientSpec>New. The Create New Client dialog is displayed.
- Enter the name you want to assign to the client workspace and click OK. The Perforce Client Specification form is displayed. For details about the form fields, click FormInfo.
- In the Root field, enter the client root directory (where Perforce store client-side copies of depot directories and files). (You cannot use UNC notation, for example \\myserver\myroot, to specify a client root directory.)
- In the View field, specify the mapping of depot locations to their client workspace. (For details about specifying the mapping, see "Defining a client view" on page 23.)
- Specify desired client options as described in the following table.
Option1
|
allwrite
|
All files in the client workspace are writable (can be modified).
|
noallwrite
|
Only files that are opened for edit on the client workspace are writable (can be modified).
|
Option2
|
clobber
|
Syncing files overwrites writable files on the client workspace.
|
noclobber
|
Protects writable files on the client workspace during file sync
|
Option3
|
compress
|
Compresses data sent between the client workspace and the Perforce server.
|
nocompress
|
Does not compress data sent between the client computer and the server computer.
|
Option4
|
locked
|
Allows only the owner to use, change, or delete the client specification.
|
unlocked
|
Allows anyone to use, change, or delete the client specification.
|
Option5
|
modtime
|
Modification time for files edited in the client workspace is set to the time when the file is submitted to the depot.
|
nomodtime
|
Modification time for files edited on the client workspace is set to the time when the file is synced or reverted.
|
Option6
|
rmdir
|
Deletes a client workspace subdirectory if all the files contained in the subdirectory are removed.
|
normdir
|
Leaves an empty subdirectory in the client workspace, even after all the files in the subdirectory are removed.
|
LineEnd
|
Specifies which line-ending convention is used when a file is synced to the client workspace.
- local: Uses the client platform default
- unix: LF
- mac: CR
- win: CR/LF
- 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)
|
- Click Update to save your entries and create the client specification.
To create a client specification using a template: Right-click the template client specification and choose Create/update Client using Clientname as Template...
Defining a client view
Client workspaces are local directories where you work on copies of depot files. You map depots or portions of depots to local directories when you create a client specification, by specifying the client view. The directories get created as required when you sync files from the depot.
To specify a client view, enter the client view definition (in the View field of the Perforce Client Specification dialog box), with one mapping per line. To map depot files to client workspace files, use the following syntax:
//depot_side //client_side
where depot_side specifies the files in the depot using Perforce depot syntax, and client_side specifies the files in the client workspace, using either Perforce client syntax or local syntax. The depot and client sides of the specification must be separated by a space.
To add files to a client view:
- Choose View>Entire Depot. All files in the depot are displayed.
- In the depot pane, select the files you want to add to the current client view.
- Choose File>Add Files to Client View.
To exclude files or directories, precede the mapping with a minus (-) sign, as follows:
-//depot_side //client_side
To change the client view:
- With client specifications displayed in the right pane, click the client specification you want to change.
- Choose ClientSpec>Edit user... The Client Specification form is displayed.
- Change the entries in the View field.
The following wildcard characters can be used in client view specifications.
Character
|
Description
|
---|
*
|
Includes all files within a single directory.
|
...
|
Includes all files and subdirectories, as well as the contents of these subdirectories.
|
%n
|
Used to remap portions of filenames in views. n must be an integer between 1 and 9. Example:
//depot/elm_proj/doc/%1.%2 //mike_elm/doc/%2.%1
maps myfile.abc to abc.myfile.
|
Any wildcard used on the depot side of a mapping must be matched with an identical wildcard in the mapping's client side. Any string matched by the wildcard will be identical on both sides.
Switching the client workspace or server
To switch to another client workspace or server, you change settings as follows.
To switch client specification, server, or port:
- Choose Settings>Switch Port Client User. The Switch Port Client User dialog is displayed.
- Choose the desired setting from the Recent list or enter the desired combination and click OK.
To switch client specification:
- Choose View>ClientSpecs.
- Right-click the desired client specification.
- From the context menu, choose Switch To client.
Connecting to the Perforce server
To configure P4Win to connect to a Perforce server, you specify name of the computer where the Perforce server is located and the port on which the server listens for requests from Perforce client applications.
To connect to a server:
- Choose Settings>Options.... The Perforce Options dialog is displayed.
- Click the Connections tab.
- Enter the desired server and port in the P4 Port field, using the syntax server:port#.
- Click OK.
To display information about your server connection, choose Help>Show Connection Info. The information is displayed in the output pane at the bottom of the screen.
Configuring the temporary files directory
P4Win creates temporary files that are displayed when you view an unopened depot file. You can specify the directory where the temporary files are created. The default directory is %TEMP%\p4win. To avoid conflicts with other applications, specify a directory that is not used by other applications.
To specify the temporary file directory:
- Choose Settings>Options... The Perforce Options dialog is displayed.
- Click the Miscellaneous tab. Specify the directory where you want P4Win to create its temporary files.
- Click OK to save your changes.
To specify that temporary files are not to be used when viewing an unopened depot file:
- Choose Settings>Options and click the Edit/View tab.
- At the bottom of the dialog, click the radio button corresponding to the desired option.
The options are as follows:
- To view unopened depot files using temporary files, choose "Always use a temp file when viewing an unopened depot file."
- To view unopened depot files from the location as mapped in your client view, choose "Never use a temp file when viewing an unopened depot file."
- To ensure that, when P4Win displays unopened HTML files, any links referring to local files and images work, choose "Don't use temp for these extensions" and specify a comma-separated list of HTML file extensions (omit periods and do not separate entries with spaces).
|
Configuring users
|
|
Displaying users
To display Perforce users, do any of the following:
- Click
.
- Press F11.
- Choose View>Users.
- Choose User>View Users.
Managing users
You can manage Perforce users as follows.
To create a user:
- Choose User>New. The Create New User dialog is displayed.
- Enter the name of the user you want to create and click OK. The Perforce User Specification form is displayed.
- Enter the information for the new user. For details about the form fields, click FormInfo.
- Click Update to save your changes.
To change a user, right-click the user in the right pane and choose Edit User... from the context menu.
To add files to a user's review list, select the files in the depot pane and choose Files>Add Files to User Reviews... (For details about Perforce review lists, refer to the Perforce User's Guide.)
To display information about a user, choose User>Describe.
To set or change the user password, choose User>Set Password for user.
To switch to another user:
- In the right pane, click the user to which you want to switch.
- Choose User>Switch to user.
To delete a user, right-click the user in the right pane and choose Delete user from the context menu
Note
|
When you delete a user, the user's client workspace files and directories are not deleted. To delete the directories and files, use Windows Explorer or DOS commands.
|
|
Configuring related utilities
|
|
Configuring editors for files and file types
You can specify the application to be used to edit a specific file or file type as follows.
To specify the application to be used to edit file types:
- Choose Settings>Options.
- Click the Edit/View tab.
- Click Add. The Add File-Application Association dialog is displayed.
- Specify the extensions and corresponding editing applications for the desired the file types.
- Click OK.
To specify the application to be used to edit text files:
- Choose Settings>Options.
- Click the Edit/View tab.
- In the Default Text Editor field, enter or browse to the application to be launched when you double-click text files that have no application mapped in Windows. (Note that Perforce considers all ASCII files, for example, .cpp files, to be text files.)
- To specify that you want the default text editor to be launched instead of any application mapped in Windows, check the Ignore Windows-associated apps for ALL other text files box. The specified application is launched for all files that have a Perforce file type of text.
- To launch the specified application in its own DOS window, check the Console Application box.
See also "Configuring the temporary files directory" on page 25.
Configuring file comparison utilities
You can specify the diff application (which compares one file to another) and the merge application (which compares two versions of a file to a base version) that is launched when you resolve files interactively.
To configure file comparison utilities:
- Choose Settings>Options. The Perforce Options dialog is displayed.
- Click the Diff/Merge tab.
- Click the radio button for your selection: choose the default Perforce diff and merge applications or browse to the application you want to use.
- Click OK.
To specify diff applications according to file type:
- Choose Settings>Options. The Perforce Options dialog is displayed.
- Click the Diff/Merge tab and click the Advanced...button. The Assign Diff programs based on file extension dialog is displayed.
- Click the Add button. The Add File-Application Association dialog is displayed.
- Enter the file type extension in the top field, including the leading period(.). To associate a diff application with multiple file types, enter the extensions as a list with entries separated by semicolons (for example: .h;.c;.cpp).
- Enter the full path to the application executable in the bottom field or click the Browse button and browse to the application.
- Click OK to dismiss the Add File-Application Association dialog, then click OK to dismiss the Assign Diff programs based on file extension dialog.
Adding commands to the Tools menu
You can add up to 64 commands or submenus to the Tools menu. You can save the tools you've defined to a file that you can copy to P4Win users on other computers. Those users can import your tools from the file.
To add commands to the Tools menu:
- Choose Tools>Customize... The Customize Tools Menu dialog is displayed.
- Click Add. The Add Tools Menu Item dialog is displayed.
- Enter the menu item you want to appear on the Tools menu.
- Click OK to dismiss the dialog.
- In the Add Tools Menu Item dialog, specify the command you want the menu item to execute as follows:
Field
|
Description
|
---|
Command
|
Enter the command as you invoke it at the DOS prompt.
|
Arguments
|
For each argument for the command, enter one of the following specifiers. Uppercase specifiers send values to the command as a group, whereas 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.
|
%A, %a
|
Selected labels.
|
%B, %b
|
Selected branches.
|
%C, %c
|
Selected changelists.
|
%D, %d
|
Selected filenames in depot syntax.
|
%F, %f
|
Selected filenames in local operating system syntax.
|
%I, %i
|
Selected client specifications.
|
%J, %j
|
Selected jobs (from jobs list or changelists)
|
%L, %l
|
Files selected in the depot, if the left pane is active.
|
%O, %o
|
Selected files that are open (if the left pane is active) or all open files (if the right pane is active).
|
%P, %p
|
Selected pending changelist.
|
%S, %s
|
Selected submitted changelist.
|
%R, %r
|
All files selected in a changelist, if the right pane is active.
|
%U, %u
|
Selected users.
|
$C
|
Current client specification
|
$P
|
Current port
|
$R
|
Current client root
|
$U
|
Current user
|
Initial directory
|
Enter the directory where you want the command to execute. Valid options are as follows:
- Specify the directory using operating system syntax; for example: C:\tmp.
- Specify %f, which evaluates to the directory of the selected file. The resulting behavior depends on whether you specify other replaceable parameters in the Argument field, as follows:
|
Console application
|
Check if you want the command to execute in its own console.
|
Prompt for arguments
|
Check if you want users to enter arguments at runtime, after they select the menu item.
|
- Click OK to save your entries.
To add submenus to the Tools menu:
- Choose Tools>Customize... The Customize Tools Menu dialog is displayed.
- Click Add. The Add Tools Menu Item dialog is displayed.
- Enter the menu item you want to appear on the Tools menu.
- Click the Submenu radio button.
- Click OK to dismiss the dialog. All commands you enter beneath a submenu appear on the submenu.
You can add the following example items to the Tools menu. (For tool definitions, consult the online help system.)
- Diff2: compares two files.
- Doit: opens or executes a selected client file.
- DoAll: opens or executes multiple files.
- Fixes: displays jobs associated with changelists that affect a selected file.
To export tool definitions to a text file, choose Tools>Export... and specify the name and location of the export file.
To import tool definitions, choose Tools>Import..., browse to the location of the export file, and click OK. The tools are added in a submenu indicating the user that created the import file.
|
Configuring P4Win performance
|
|
Maximizing P4Win performance
To obtain the best performance from P4Win, observe the following guidelines and suggestions.
- Avoid DNS lookup: Specify an IP address instead of a node name in the Port field of the Switch Port Client User dialog. For details about these settings, refer to "Switching the client workspace or server" on page 24.
- Minimize data transfers: In networked environments, you can minimize the amount of data that P4Win requests from the Perforce server as follows:
- Do not open the
node. (When this node is opened, P4Win retrieves the names of every open file from the server).
- Disable the Automatically reload pane when it is uncovered option on the Settings dialog Connections tab. (You must refresh panes manually after disabling this option.)
- Limit the number of files to be sorted by extension: choose Settings, click the Options tab, and set the Max number of depot files to sort by extension field.
- Disable the menu option for Changelist>Filter Submitted Changelists for Selected Files, including integrations by unchecking Enable including integrations when filtering submitted changes on the Settings dialog Display tab.
- Hide the Show Branching History check box on the Revision History dialog by unchecking Enable displaying branching history in the Revision History dialog on the Settings dialog Display tab.
The Perforce superuser on your system can configure the Perforce server to limit the amount of data on which a single command can operate. If you exceed this limit, P4Win displays a "Request too large" message in the output pane. You can still run the command if you limit the amount of data returned, as described below.
Action
|
To limit the amount of data returned
|
---|
Display Submitted Changelists
|
Click the Connection tab, and specify the maximum number of changelists to display.
|
Display Jobs
|
Choose Settings>Options..., click the Connection tab, and specify the maximum number of jobs to display. Also, you can use a filter to limit the jobs displayed. For details, see Specifying job filters.
|
Sync depot files to your client workspace
|
Break a single large sync into several syncs, each with fewer files.
|
If the system limits are set so low that practical work becomes difficult or impossible, ask the Perforce superuser to reset the MAXRESULTS value.
Large sites: if your site has a large number of files in its depot, numerous P4Win users, and numerous client specifications with wide views (meaning views that map a large portion of the depot, or the entire depot), use the following P4Win settings to obtain best performance and minimize impact on the Perforce server.
Settings tab
|
Option
|
Set to...
|
---|
Connections
|
Poll server for updates
|
OFF or a large number (30 or more)
|
|
Poll when inactive
|
OFF if Poll server for updates is set
|
|
Automatically reload depot & changelists after editing client definition
|
ON
|
|
Automatically reload pane when it is uncovered
|
OFF or a large number (30 or more).
|
|
Poll for Job updates
|
OFF
|
|
Expand pending changelists whenever a file or job is added
|
OFF
|
|
Revision History Window
|
Choose Automatically fetch last... and set value to 100 or less.
|
Display
|
Show deleted depot files
|
OFF
|
|
Enable including integrations when filtering submitted changes
|
OFF
|
|
Enable displaying branching history in the Revision History dialog
|
OFF
|
Miscellaneous
|
Depot pane file tree expansion upon switching Port or Client or User
|
Do not expand depot
|
Enabling data compression for file transfers
To speed up slow connections, you can configure Perforce to compress data before transferring the data between the client computer and the server computer. Note that this option might slow down communications when the connection is already fast.
To enable file compression:
- Choose View>ClientSpecs. Client specifications are displayed in the right pane.
- Right-click your client workspace specification and choose Edit from the context menu. The Perforce Client Specification form is displayed.
- In the Options field, if the NOCOMPRESS option is specified, change this option to COMPRESS.
- Click Update to save your settings.
|
|
|
Please send comments and questions about this manual to
[email protected].
Copyright 2001-2002 Perforce Software. All rights reserved.
Last updated: 04/03/02
|