Perforce CodeWarrior Plug-in

1,208 views
1,134 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,208
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Perforce CodeWarrior Plug-in

  1. 1. Perforce CodeWarrior Plug-in for Macintosh and Windows Version 2000.2.cwp.1 December 2000
  2. 2. This manual copyright 2000 PERFORCE Software. All rights reserved. PERFORCE software and documentation is available from http://www.perforce.com/. You may download and use PERFORCE programs, but you may not sell or redistribute them. You may download, print, copy, edit, and redistribute the documentation, but you may not sell it, or sell any documentation 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. 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 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 software developed 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.
  3. 3. Table of Contents Chapter 1 The PERFORCE CodeWarrior Plug-in What You Need to Know 5 How to Report Bugs 5 Chapter 2 Installing PERFORCE CodeWarrior Plug-in Overview 7 Macintosh Installation 7 Windows Installation 7 Using the new apple file type 8 Chapter 3 Configuring PERFORCE CodeWarrior Plug-in Specifying Version Control Settings 9 Chapter 4 Using PERFORCE CodeWarrior Plug-in The VCS Menu 13 Displaying results of commands 14 Scripting PERFORCE ON Macintosh computers 14 Storing Macintosh files 14 Assigning Macintosh defaults for PERFORCE file types 14 PERFORCE CodeWarrior Plug-in Menu Commands 16 PERFORCE CodeWarrior Plug-in User’s Guide 3
  4. 4. Table of Contents PERFORCE CodeWarrior Plug-in User’s Guide 4
  5. 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 Know This 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 Bugs You can report bugs and make enhancement requests for this product by sending email to support@perforce.com. Before you contact us, check the buglist file in the PERFORCE CodeWarrior Plug-in download to see if your problem is listed. PERFORCE CodeWarrior Plug-in User’s Guide 5
  6. 6. The PERFORCE CodeWarrior Plug-in PERFORCE CodeWarrior Plug-in User’s Guide 6
  7. 7. Chapter 2 Installing PERFORCE CodeWarrior Plug-in Overview Before 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 BinPluginsVersion Control subdirectory of the directory where CodeWarrior is installed. The resulting folder is called CWPerforce PERFORCE CodeWarrior Plug-in User’s Guide 7
  8. 8. Installing PERFORCE CodeWarrior Plug-in Using the new apple file type The 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. PERFORCE CodeWarrior Plug-in User’s Guide 8
  9. 9. Chapter 3 Configuring PERFORCE CodeWarrior Plug-in Specifying Version Control Settings This 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 version control settings (settings you make when no project is open); conflicts between project-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. PERFORCE CodeWarrior Plug-in User’s Guide 9
  10. 10. Configuring PERFORCE CodeWarrior Plug-in 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: To be asked Set Set for your “Always Show Login Dialog” “Remember Password” to: password: to: Never Off On Once Off Off Always On Off 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. PERFORCE CodeWarrior Plug-in User’s Guide 10
  11. 11. Configuring PERFORCE CodeWarrior Plug-in 13. Specify the client options, as follows. Checkbox Effect Show all Specifies whether the results of some PERFORCE operations display a information dialog containing messages about the results of the operation. messages Always show Specifies whether job lists are always displayed on the Submit form, job lists or only when there are jobs already linked to the changelist. 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. PERFORCE CodeWarrior Plug-in User’s Guide 11
  12. 12. Configuring PERFORCE CodeWarrior Plug-in The Amount of Menu Detail field specifies what menu options are con- tained in the VCS menu. The options are as follows. Advantages / Option Description Example Disadvantages Simple Only the basic The VCS menu Advantage: shorter menus. menu options are contains Sync but Disadvantage: advanced opera- displayed. not Sync... tions such as p4 sync -f can’t be performed directly from the VCS menu. Advanced For menu options The VCS menu Advantage: CWPERFORCE dis- that have both a contains Sync... plays dialog boxes for most of basic and but not Sync the commands, allowing more advanced version, advanced options to be speci- the advanced ver- fied for each command, such as sion is displayed 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 The VCS menu Advantage: you can choose that have both a contains both between the simple and basic and Sync and Sync... . advanced form of the com- advanced version, mands both versions are Disadvantage: the VCS menu displayed. size doubles. PERFORCE CodeWarrior Plug-in User’s Guide 12
  13. 13. Chapter 4 Using PERFORCE CodeWarrior Plug-in The VCS Menu After PERFORCE CodeWarrior Plug-in has been installed, the VCS menu is dis- Note 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 (on Macintosh computers): computers, the PERFORCE CodeWarrior Plug-in icon looks like a short stack of yellow documents between the Windows and Help menus. 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. 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}. PERFORCE CodeWarrior Plug-in User’s Guide 13
  14. 14. Using PERFORCE CodeWarrior Plug-in 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 commands To 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 files To 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. PERFORCE CodeWarrior Plug-in User’s Guide 14
  15. 15. Using PERFORCE CodeWarrior Plug-in 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. Macintosh file type Perforce file type Macintosh apple Plain text text Binary data binary 6. Click the Change button. 7. Enter your changes. 8. Save your changes. PERFORCE CodeWarrior Plug-in User’s Guide 15
  16. 16. Using PERFORCE CodeWarrior Plug-in 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- Related p4 Key/Advanced Command Menu Action Synchronize Synchronizes the CodeWarrior None None Status 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. Sync Copies the head revisions of the Enables you to sync selected files from the depot to enter revision the client workspace, if not specifications already copied. and other p4 sync options. 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. Edit Opens the selected files for edit Opens the files edit in the client workspace. for edit and enables you to change the file types. Revert Reverts the selected files to the None revert revision last synced from the depot. Filelog Displays the revision history of Displays the full filelog the selected files. description of each changelist. Have List the revision numbers of the None have selected files that were last synced to the client workspace. PERFORCE CodeWarrior Plug-in User’s Guide 16
  17. 17. Using PERFORCE CodeWarrior Plug-in Diff Diff’s the revision as edited on Enables you to diff the client workspace against the select the diff revision last synced from the style, and to force depot, using the CodeWarrior the diff. diff utility. Add Add the selected files to the Enables you to add depot. set the file’s PER- FORCE file type. 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 Delete Deletes the selected files from None delete 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. Submit Displays the submission dialog None submit 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. Resolve For files scheduled for resolve, 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. CWPerforce Mac 99.1 17
  18. 18. Using PERFORCE CodeWarrior Plug-in Opened Displays the list of all open files Enables you to opened (Recursive sub- in the current client workspace. view a list of all menu) open files in all client work- spaces. Connect and Irrelevant for CWPERFORCE None None Disconnect) users. The VCS API requires use of this menu option, but PERFORCE has no corresponding feature. About Display information about your None info current PERFORCE configura- tion in an About Box dialog. Command... Enables you to run any PER- None None 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. PERFORCE CodeWarrior Plug-in User’s Guide 18

×