Chapter 6
TogetherSoft Together
This chapter describes how to perform Perforce source code control tasks in the Together environment. It assumes the Perforce SCC Plug-in is installed and that your client machine can communicate with the Perforce server.
When you configure Togther with the Perforce SCC Plug-in, the settings are specific to the project you are working on, so no overall Perforce configuration is required. The Perforce SCC Plug-in retains project settings from session to session and it is not necessary to re-enter them.
Basic SCM tasks
This section tells you how to perform the following tasks:
The System dialog, which you display by right-click and choosing Version Control>System... from the pop-up menu, enables you to perform the full range of features supported by the Perforce SCC Plug-in for the Together IDE. The procedure in the following sections describe basic approaches to the most common tasks.
Adding a project to the depot
When you create a project that you intend to manage with Perforce, specify a location that resides within the Perforce client root folder of the client specification you intend to use to manage the project, as illustrated in the following figure.
To configure Perforce as the SCM provider for a project:
- Choose Project > Project Properties...
- On the Project Properties dialog, check the Version control project path check box, then click Options.
- On the Project Options: Version Control dialog, check Version Control enabled and choose "SCC" from the "Use" field drop-down list.
- Click OK to dismiss the Project Options: Version Control dialog.
- On the Project Properties dialog, click the
button (lower right). The Open Connection dialog is displayed.
- On the Open Connection dialog, specify Perforce settings as follows:
- Server: the name of the host computer running the Perforce server in which you want to store the project.
- Port: the port number on which the specified Perforce Server accepts commands.
- User: the Perforce user name you want associated with the SCM operations you perform on the project. To choose from a list of users defined for the specified server, click Browse.
- Password: the user's password, if any.
- Client: the Perforce client specification want associated with the SCM operations you perform on the project. To choose from a list of client specifications defined for the specified server, click Browse.
- Click OK to save settings and dismiss the dialog. The Add Files to Perforce dialog is displayed, listing files to be added.
- Click OK to dismiss the dialog.
- In the Project Explorer pane, right-click the project and choose Check In... The Check in to Version Control dialog is displayed.
- Verify that all project files are checked and click OK. The Pending Changelist dialog is displayed.
- Enter a comment and click Submit. Checked in files are listed with a lock icon, as shown in the following figure.
Checked-in files are displayed with a lock icon, as shown in the following figure.
Note
|
If Together can not communicate with the Perforce server configured for a project, it disables the version control setting for the project. After reestablishing communication with Perforce, you must reselect this option manually. [TRUE?]
|
Retrieving files from the depot
To retrieve files from the depot:
- In the Explorer pane, right-click the files you want to retrieve.
- Choose Version Control > Get... The Get from Version Control dialog is displayed.
- Check the files you want to retrieve.
To retrieve revisions prior to the head (latest) revision, you can sync from the Revision History dialog or perform the following steps:
- Click the Advanced button, dismiss the "Advanced sync dialog..." prompt, and click OK. The Sync dialog is displayed. specify the revision you want to retrieve, using a Perforce changelist number, label, version number, or date, and click OK. For details about specifying revisions, refer to the Perforce User's Guide.
- To preview the results of the operation without actually retrieving files, check No file updates.
- If you retrieve a file from the depot, then delete your local copy, you can retrieve it again by checking Force resynchronization. By default, Perforce assumes you still have your copy and doesn't retrieve it again.
- Click OK
Note
|
If you retrieve a file that you already have checked out, for example, to obtain changes checked in by another user, Perforce will require you to resolve the file, to enable you to merge your changes with changes made by other users and to ensure that you don't inadvertently overwrite other changes.
|
Checking files out
You must check out a project before adding, changing, or deleting packages.
To check out files from the depot for editing, perform the following steps:
- Right-click the file you want to check out and choose Version Control>Check Out...
The Check out from Version Control dialog is displayed, listing the files to be checked out.
- Click OK.
The Perforce Message dialog is displayed, indicating the files are opened for edit.
- Click OK to dismiss the dialog.
In the Explorer pane, the file is displayed without a lock icon, indicating that it is checked out.
Checking files in
To check files you've edited, perform the following steps:
- Right-click the file you want to add and choose Version Control>Check In... from the pop-up menu.
The Check in to Version Control dialog is displayed, listing the files to be checked in.
- Click OK.
The P4 Submit form is displayed, listing the files to be submitted to the depot.
- Enter your comments and click OK.
- The Perforce Message dialog is displayed, listing the results of the submit operation.
- Click OK to dismiss the dialog.
The file is now displayed with a lock icon, indicating it is checked in.
Resolving file conflicts
If you encounter conflicts when checking in files, (for example, from multiple users working on the same files,) you must resolve the conflicts before you can submit the files. For example, if you and another user have changed the same file and the other user checked in changes before you, when you attempt to check in your changes, Perforce notifies you that resolution is required by displaying the following message in the Pending Changelist dialog:
To resolve file conflicts:
- Click Sync and select the files to be resolved. The button text changes to Resolve.
- Click Resolve and choose All Files... The Resolve Files dialog is displayed, describing the extent of the file differences and listing the following options:
- Enter a description of your changes and click Submit. Your changes are checked in.
Diffing files
To diff a file you are editing with the head revision in the depot, right-click the file and choose Version Control > Diff.
To diff two revisions of a file, perform the following steps:
- Right-click the file and choose Version Control > History. The Revision History dialog is displayed, listing the revisions in the depot.
- To diff two revisions drag one revision to the other.
P4Diff is launched, displaying file differences.
Reverting files
To discard any changes you've made to a file and restore the head revision from the depot, perform the following steps:
- Right-click the file you want to add and choose Version Control>UnCheck out... from the pop-up menu.
The Undo check out from Version Control dialog is displayed with the file selected.
- Click OK.
You can also revert unchanged files from the Pending Changelist dialog.
Working with Together files
TogetherSoft suggests that all .tpr and .df* files be put under version control. The .tpr file is the Together project file. The .df* files are the UML diagram files. The .tws file contains the project settings. There is no reason to place this file under version control.
Please send comments and questions about this manual to
manual@perforce.com.
Copyright 2001-2004 Perforce Software. All rights reserved.
Last updated: 02/26/04