perforce codewarrior plug-in

18
Perforce CodeWarrior Plug-in for Macintosh and Windows Version 2000.2.cwp.1 December 2000

Upload: sammy17

Post on 13-Jan-2015

1.048 views

Category:

Documents


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Perforce CodeWarrior Plug-in

Perforce CodeWarrior Plug-infor Macintosh and Windows

Version 2000.2.cwp.1December 2000

Page 2: Perforce CodeWarrior Plug-in

This manual copyright 2000 PERFORCE Software.All rights reserved.

PERFORCE software and documentation is available fromhttp://www.perforce.com/. You may download and use PERFORCE programs, but you may not sell or redistributethem. You may download, print, copy, edit, and redistribute the documentation, but you may not sell it, or sell anydocumentation derived from it. You may not modify or attempt to reverse engineer the programs.

PERFORCE programs and documents are available from our Web site as is. No warranty or support is provided. Warrantiesand support, along with higher capacity servers, are sold by PERFORCE Software.

PERFORCE Software assumes no responsibility or liability for any errors or inaccuracies that may 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. PERFORCE software includes softwaredeveloped by the University of California, Berkeley and its contributors.

CodeWarrior copyright 1993-1998 Metrowerks Inc. WASTE text engine © 1993-1998 Marco Piovanelli

All other brands or product names are trademarks or registered trademarks of their respective companies or organizations.

Page 3: Perforce CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 3

Table of Contents

Chapter 1 The PERFORCE CodeWarrior Plug-inWhat You Need to Know 5How to Report Bugs 5

Chapter 2 Installing PERFORCE CodeWarrior Plug-inOverview 7Macintosh Installation 7Windows Installation 7Using the new apple file type 8

Chapter 3 Configuring PERFORCE CodeWarrior Plug-inSpecifying Version Control Settings 9

Chapter 4 Using PERFORCE CodeWarrior Plug-inThe VCS Menu 13Displaying results of commands 14Scripting PERFORCE ON Macintosh computers 14Storing Macintosh files 14Assigning Macintosh defaults for PERFORCE file types 14PERFORCE CodeWarrior Plug-in Menu Commands 16

Page 4: Perforce CodeWarrior Plug-in

Table of Contents

PERFORCE CodeWarrior Plug-in User’s Guide 4

Page 5: Perforce CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 5

Chapter 1 The PERFORCE CodeWarrior Plug-in

The PERFORCE CodeWarrior Plug-in enables you to use PERFORCE from within CodeWarrior. The following table lists the system requirements for PERFORCE CodeWarrior Plug-in:

• PERFORCE server (for CodeWarrior on Macintosh, version 99.2 or higher is recommended)

• CodeWarrior IDE 4.0 or higher.

If you have not yet installed PERFORCE, or if you need a newer version, you can download it from <http://www.perforce.com/perforce/loadprog.html>.

What You Need to KnowThis manual assumes that you already know how to use PERFORCE. If this is your first experience with PERFORCE, download the explanatory PERFORCE documenta-tion from <http://www.perforce.com/perforce/technical.html>.

How to Report BugsYou can report bugs and make enhancement requests for this product by sending email to [email protected]. Before you contact us, check the buglist file in the PERFORCE CodeWarrior Plug-in download to see if your problem is listed.

Page 6: Perforce CodeWarrior Plug-in

The PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 6

Page 7: Perforce CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 7

Chapter 2 Installing PERFORCE CodeWarrior Plug-in

OverviewBefore you install PERFORCE CodeWarrior Plug-in, you must download the archive file for your CodeWarrior platform from the PERFORCE Web site. After you download the file, perform the steps for your platform as described in the follow-ing sections.

After you install PERFORCE CodeWarrior Plug-in, configure your version control settings. For details, refer to “Specifying Version Control Settings” on page 9.

Macintosh Installation

To install PERFORCE CodeWarrior Plug-in on Macintosh computers:

1. If CodeWarrior is open, close it.

2. Unstuff the archive file into the CodeWarrior Plugins folder located under the directory where CodeWarrior is installed. The resulting folder is called CWPerforce.

Windows Installation

To install PERFORCE CodeWarrior Plug-in on Windows computers:

1. If CodeWarrior is open, close it.

2. Open the .zip file.

3. Extract the files from the .zip file into the Bin\Plugins\Version Control subdirectory of the directory where CodeWarrior is installed. The resulting folder is called CWPerforce

Page 8: Perforce CodeWarrior Plug-in

Installing PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 8

Using the new apple file typeThe PERFORCE apple file type stores Macintosh files in the depot as a single file containing both the data and resource forks.

Pre-2000.1 versions of PERFORCE stored Macintosh file forks as separate files in the depot. If your depots contain Macintosh files stored in this manner, upgrade the existing files to use the apple format. If you do not convert existing files after you upgrade, PERFORCE continues to store them using its two-file approach. For detailed conversion instructions, refer to the plug-in release notes.

Page 9: Perforce CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 9

Chapter 3 Configuring PERFORCE CodeWarrior Plug-in

Specifying Version Control SettingsThis chapter tells you how to specify PERFORCE CodeWarrior Plug-in settings in the CodeWarrior IDE. The screens shown in this section are Windows screens. The Macintosh screens are identical in contents, though different in general appear-ance.

Note: Be sure to specify version control settings for each project. Do not use global versioncontrol settings (settings you make when no project is open); conflicts betweenproject-level and global settings cause problems for CodeWarrior.

To configure PERFORCE CodeWarrior Plug-in for use with CodeWarrior:

1. Launch the CodeWarrior IDE.

2. Open the project for which you want to specify version control settings.

3. Choose Version Control Settings... from the Edit menu.

4. CodeWarrior displays the VCS Settings dialog. (Note that Perforce Setup at the left of the screen is not displayed until after you complete the following step.)

5. Select Use Version Control and choose Perforce as the Method.

Page 10: Perforce CodeWarrior Plug-in

Configuring PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 10

If Perforce is not listed in the Method popup, PERFORCE CodeWarrior Plug-in is not installed correctly. Verify that you extracted the PERFORCE CodeWar-rior Plug-in to the correct directory. For details, refer to “Installing Perforce CodeWarrior Plug-in” on page 7.

6. Specify Login Settings.

In the Username field, type the PERFORCE user name (the P4USER value) for the client workspace you want to link to this project. If this PERFORCE user has a password and you want the system to remember it, select Remember Pass-word and type the password into the Password field.

To provide the desired level of security, set the Login Settings checkboxes as follows1:

The Connect on Open checkbox determines whether you are first asked to login when the project starts up, or at the time you perform the first PERFORCE operation.

7. Specify Database Path.

Database Path is the current working directory for files specified using rela-tive paths in the VCS menu’s Command... menu item. If you are specifying global settings, enter the P4CLIENT root.

8. Choose “Project relative” and enter the project root.

9. Click Choose. CodeWarrior displays the Access Path dialog. Browse to the desired folder, and click OK.

10. To specify Local Path, enter the P4CLIENT root, or click Choose. CodeWar-rior displays the Access Path dialog. Browse to the desired folder, and click OK.

Local Path is the directory used as root for all of the VCS menu’s Recursive commands.

11. Click Perforce Setup in the left pane of the VCS Settings dialog. CodeWar-rior displays the Perforce Setup pane on the right side of the dialog, as shown in the following figure:

12. Set P4PORT and P4CLIENT to the proper values for this particular project.

If the client workspace you specify in the P4CLIENT field doesn’t yet exist, create the workspace using one of the following tools:

• the p4 command from the operating system command prompt (or MPW on Macintosh)

• P4Win

• the VCS menu Command... menu item.

1. No matter how you set these checkboxes, you might still be asked to login on occasion.

To be asked for your password:

Set “Always Show Login Dialog” to:

Set “Remember Password” to:

Never Off On

Once Off Off

Always On Off

Page 11: Perforce CodeWarrior Plug-in

Configuring PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 11

13. Specify the client options, as follows.

14. For Windows computers, specify the menu options you want CodeWarrior to display on the VCS menu.

Advanced menu options are displayed with an ellipsis (...). When you select an advanced menu option, CodeWarrior displays dialog boxes that enable you to specify additional options before the operation is executed.

To display advanced menu options:

• on Macintosh computers, hold down the Option key.

• on Windows computers, enable the Advanced or Both option.

Checkbox Effect

Show all informationmessages

Specifies whether the results of some PERFORCE operations display a dialog containing messages about the results of the operation.

Always show job lists

Specifies whether job lists are always displayed on the Submit form, or only when there are jobs already linked to the changelist.

Page 12: Perforce CodeWarrior Plug-in

Configuring PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 12

The Amount of Menu Detail field specifies what menu options are con-tained in the VCS menu. The options are as follows.

Option Description ExampleAdvantages / Disadvantages

Simple Only the basic menu options are displayed.

The VCS menu contains Sync but not Sync...

Advantage: shorter menus.

Disadvantage: advanced opera-tions such as p4 sync -f can’t be performed directly from the VCS menu.

Advanced For menu options that have both a basic and advanced version, the advanced ver-sion is displayed

The VCS menu contains Sync... but not Sync

Advantage: CWPERFORCE dis-plays dialog boxes for most of the commands, allowing more advanced options to be speci-fied for each command, such as being able to change a file’s type before you Add it to Per-force.

Disadvantage: the dialog boxes are always displayed, adding steps to most VCS commands.

Both For menu options that have both a basic and advanced version, both versions are displayed.

The VCS menu contains both Sync and Sync... .

Advantage: you can choose between the simple and advanced form of the com-mands

Disadvantage: the VCS menu size doubles.

Page 13: Perforce CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 13

Chapter 4 Using PERFORCE CodeWarrior Plug-in

The VCS MenuAfter PERFORCE CodeWarrior Plug-in has been installed, the VCS menu is dis-played on the CodeWarrior IDE screen when a project window is frontmost. The VCS menu is located between the Windows and Help menu, and looks like this (on Macintosh computers):

Most of the commands in this menu have the same name and functionality as the corresponding PERFORCE command. Not all PERFORCE commands are represented in the menu. To issue other PERFORCE commands, use the Command... menu item.

The following table lists the commands that PERFORCE CodeWarrior Plug-in adds to the CodeWarrior IDE.

Note

On Macintoshcomputers, the

PERFORCE

CodeWarriorPlug-in icon

looks like a shortstack of yellow

documentsbetween the

Windows andHelp menus.

Menu Contents

VCS Commands that affect all files that you select in the project window.

VCS>Project Commands that affect only the current project file.

VCS>Recursive Commands that affect all the files under the {localpath} directory that are mapped to files in the depot using the client view. Recursive commands act like p4 command {localpath}/...

Recursive commands act on the project file if the project file is under {localpath}.

Page 14: Perforce CodeWarrior Plug-in

Using PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 14

The {localpath} identifier refers to the value of the Local Path directory as set in the VCS Settings dialog (see “Configuring Perforce CodeWarrior Plug-in” on page 9).

Displaying results of commandsTo display results for all PERFORCE commands, enable the Display All Informa-tion Messages option in the VCS Settings dialog. CodeWarrior displays the results of each command in its own window (labeled VCS Message Window). By default, results are displayed only when there is no visual change in the Project window.

Scripting PERFORCE ON Macintosh computers To create scripts on Macintosh computers, use MPW to run scripts containing CodeWarrior and p4 commands.

Storing Macintosh filesTo override the default file type that PERFORCE assigns, use the advanced menu item Add... (on Macintosh computers, hold down the Option key when you choose Add.) You can also specify file type using the p4 command’s -t flag.

When you add portable binary files (for example, .GIF files) to a PERFORCE depot, store them using the PERFORCE binary format, to avoid complications when the file is sync’ed to a non-Macintosh computer.

Note: Macintosh TEXT files are always stored as PERFORCE text files (without resource forks) so the files can be diffed, resolved, and edited on platforms other than Macintosh.

Assigning Macintosh defaults for PERFORCE file types

When you add files (other than text files) from a Macintosh client to a PERFORCE depot, PERFORCE determines the file type by examining the Macintosh client’s Internet mappings database. The factors that determine how a Macintosh file is stored are as follows:

• File name extension

• Finder type

• Creator

If the Internet mappings database does not contain an entry for a file type, PER-FORCE stores it using the apple file type.

To change a default PERFORCE file type, perform the following steps:

1. Open the Macintosh Internet control panel.

2. Click the File Mapping icon in the list on the lower left part of the dialog.

3. Click the Advanced tab. If the Advanced tab is not displayed, go to the Edit... menu, choose User Mode, and set the user mode to Advanced.

4. Click the File Mapping icon.

Page 15: Perforce CodeWarrior Plug-in

Using PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 15

A list of file type mappings is displayed. The dialog looks like the following figure.

5. Locate the extension of the file type you want to change.

If the file type is not mapped, you can add a mapping by clicking the Add button.

The following table lists standard mappings for PERFORCE.

6. Click the Change button.

7. Enter your changes.

8. Save your changes.

Macintosh file type Perforce file type

Macintosh apple

Plain text text

Binary data binary

Page 16: Perforce CodeWarrior Plug-in

Using PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 16

PERFORCE CodeWarrior Plug-in Menu Commands

The following table describes the version control commands that PERFORCE CodeWarrior Plug-in adds to CodeWarrior. All recursive commands require you to specify a local path. (Note: to display the recursive subtree of a PERFORCE oper-ation on Macintosh computers, hold down the Shift key.)

To obtain access to advanced menu options on Macintosh computer, hold down the Option key and click the menu item. On Windows computers, enable the dis-play of advanced menu options from the Edit menu Version Control Settings dia-log; for details, refer to “Specifying Version Control Settings” on page 9.

Menu Command Description Option-Key/Advanced Menu Action

Related p4 Command

Synchronize Status

Synchronizes the CodeWarrior file status with the PERFORCE file status. Refreshes the version control system icons for each file in the project. Execute this command after you perform an operation outside of CodeWar-rior that affects the status of files in a CodeWarrior project.

The project window has a Syn-chronize Status button, which displays a pencil icon.

None None

Sync Copies the head revisions of the selected files from the depot to the client workspace, if not already copied.

To get all files from the depot for the first time, use Recur-sive>Sync then add the files to your project using CodeWar-rior’s Project>Add Files... com-mand.

Enables you to enter revision specifications and other p4 sync options.

sync

Edit Opens the selected files for edit in the client workspace.

Opens the files for edit and enables you to change the file types.

edit

Revert Reverts the selected files to the revision last synced from the depot.

None revert

Filelog Displays the revision history of the selected files.

Displays the full description of each changelist.

filelog

Have List the revision numbers of the selected files that were last synced to the client workspace.

None have

Page 17: Perforce CodeWarrior Plug-in

Using PERFORCE CodeWarrior Plug-in

CWPerforce Mac 99.1 17

Diff Diff’s the revision as edited on the client workspace against the revision last synced from the depot, using the CodeWarrior diff utility.

Enables you to select the diff style, and to force the diff.

diff

Add Add the selected files to the depot.

To add files recursively, select all the files in the project window and select Add.

To add the project file, use the Project>Add submenu

Enables you to set the file’s PER-FORCE file type.

add

Delete Deletes the selected files from the depot.

After you delete files from the depot, delete them from the CodeWarrior project using the Project>Remove Selected Items menu item.

To delete a CodeWarrior project, use the Project>Delete submenu.

None delete

Submit Displays the submission dialog for the default changelist. If you have open files selected in the CodeWarrior project, those files are selected in the changelist. In the recursive submit dialog, all open files under {localpath} are selected in the changelist.

To submit a numbered change-list, use the Command... menu item. If a Submit of the default changelist fails, PERFORCE assigns a number to changelist and you must use Command... to submit it.

All jobs linked to the default changelist are displayed in the Submit dialog.

To specify whether CodeWar-rior displays an empty job list in the Submit dialog, enable the Always Show Job List check-box in the Perforce Settings preferences panel. To add jobs to any changelist, use the result-ing job list.

None submit

Resolve For files scheduled for resolve, displays a dialog enabling you to select and perform the desired type of resolve.

Refer to the Perforce User’s Guide for detailed information about resolving files using PERFORCE.

resolve

Page 18: Perforce CodeWarrior Plug-in

Using PERFORCE CodeWarrior Plug-in

PERFORCE CodeWarrior Plug-in User’s Guide 18

Opened

(Recursive sub-menu)

Displays the list of all open files in the current client workspace.

Enables you to view a list of all open files in all client work-spaces.

opened

Connect and Disconnect)

Irrelevant for CWPERFORCE users.

The VCS API requires use of this menu option, but PERFORCE has no corresponding feature.

None None

About Display information about your current PERFORCE configura-tion in an About Box dialog.

None info

Command... Enables you to run any PER-FORCE command. File name arguments specified using rela-tive pathnames are interpreted by Perforce using the Database Path specified in the Version Control Settings preferences panel.

All PERFORCE special characters and wildcards are supported.

To specify files or directories with spaces in their names, use quotes around the entire file argument; for example:p4 changes "//depot/a b c"

The Command... menu item does not currently support:

• PERFORCE commands that use PERFORCE’s global options.

• File or directory names con-taining quotes.

• MPW special characters such as >>>.

• Output redirection.

If you need to use any of these features:

• on Macintosh, use PERFORCE through MPW

• on Windows, use the p4 com-mand line interface.

None None