Perforce 2001.1 P4Win Help in Print
<< Previous Chapter
Using the P4Win Interface
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Managing Files

Chapter 2
Configuring P4Win

Configuring client workspaces


Displaying client specifications

You can display client specification information as follows.

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:

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:

  1. Choose ClientSpec>New. The Create New Client dialog is displayed.

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

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

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

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

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

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:

  1. Choose View>Entire Depot. All files in the depot are displayed.

  2. In the depot pane, select the files you want to add to the current client view.

  3. Choose File>Add Files to Client View.

To exclude files or directories, precede the mapping with a minus (-) sign, as follows:

To change the client view:

  1. With client specifications displayed in the right pane, click the client specification you want to change.

  2. Choose ClientSpec>Edit user... The Client Specification form is displayed.

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

  1. Choose Settings>Switch Port Client User. The Switch Port Client User dialog is displayed.

  2. Choose the desired setting from the Recent list or enter the desired combination and click OK.

To switch client specification:

  1. Choose View>ClientSpecs.

  2. Right-click the desired client specification.

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

  1. Choose Settings>Options.... The Perforce Options dialog is displayed.

  2. Click the Connections tab.

  3. Enter the desired server and port in the P4 Port field, using the syntax server:port#.

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

  1. Choose Settings>Options... The Perforce Options dialog is displayed.

  2. Click the Miscellaneous tab. Specify the directory where you want P4Win to create its temporary files.

  3. Click OK to save your changes.

To specify that temporary files are not to be used when viewing an unopened depot file:

  1. Choose Settings>Options and click the Edit/View tab.

  2. Uncheck the Always use a temporary file when viewing an unopened depot file checkbox at the bottom of that page.

The file is displayed from its location as mapped in your client view.

Configuring users


Displaying users

To display Perforce users, do any of the following:

Managing users

You can manage Perforce users as follows.

To create a user:

  1. Choose User>New. The Create New User dialog is displayed.

  2. Enter the name of the user you want to create and click OK. The Perforce User Specification form is displayed.

  3. Enter the information for the new user. For details about the form fields, click FormInfo.

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

  1. In the right pane, click the user to which you want to switch.

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

  1. Choose Settings>Options.

  2. Click the Edit/View tab.

  3. Click Add. The Add File-Application Association dialog is displayed.

  4. Specify the extensions and corresponding editing applications for the desired the file types.

  5. Click OK.

To specify the application to be used to edit text files:

  1. Choose Settings>Options.

  2. Click the Edit/View tab.

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

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

  5. To launch the specified application in its own DOS window, check the Console Application box.

See also "Configuring the temporary files directory" on page 23.

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:

  1. Choose Settings>Options. The Perforce Options dialog is displayed.

  2. Click the Diff/Merge tab.

  3. Click the radio button for your selection: choose the default Perforce diff and merge applications or browse to the application you want to use.

  4. Click OK.

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:

  1. Choose Tools>Customize... The Customize Tools Menu dialog is displayed.

  2. Click Add. The Add Tools Menu Item dialog is displayed.

  3. Enter the menu item you want to appear on the Tools menu.

  4. Click OK to dismiss the dialog.

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

    %S, %s

    Selected submitted changelists.

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

    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.

  6. Click OK to save your entries.

To add submenus to the Tools menu:

  1. Choose Tools>Customize... The Customize Tools Menu dialog is displayed.

  2. Click Add. The Add Tools Menu Item dialog is displayed.

  3. Enter the menu item you want to appear on the Tools menu.

  4. Click the Submenu radio button.

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

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.

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

Reset the number of changelists retrieved from the server to a smaller value: choose Settings>Options..., click the Connection tab, and specify the maximum number of changelists to display.

Display Jobs

Reset the number of jobs retrieved from the server to a smaller value: choose Settings>Options..., click the Connection tab, and specify the maximum number of jobs to display.

Use a filter to display only some of the jobs in the display. For details, see "Specifying job filters" on page 42.

Sync depot files to your client workspace

Break a single large sync into several commands, 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.

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:

  1. Choose View>ClientSpecs. Client specifications are displayed in the right pane.

  2. Right-click your client workspace specification and choose Edit from the context menu. The Perforce Client Specification form is displayed.

  3. In the Options field, if the NOCOMPRESS option is specified, change this option to COMPRESS.

  4. Click Update to save your settings.


Perforce 2001.1 P4Win Help in Print
<< Previous Chapter
Using the P4Win Interface
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Managing Files
Please send comments and questions about this manual to [email protected].
Copyright 2001 Perforce Software. All rights reserved.
Last updated: 10/03/01