PowerBuilder and Surround SCM both support the Microsoft SCC Interface (MSSCCI), which allows Surround SCM to be integrated into PowerBuilder workspaces.
This article includes information about integration requirements, setting up the integration, performing Surround SCM actions in PowerBuilder, license usage, and troubleshooting.
Note: The PowerBuilder integration is not officially supported by Perforce and has not been tested.
The PowerBuilder SCC Interface component must be installed. Refer to the PowerBuilder documentation for information.
Setting up the integration
- Right-click the workspace to integrate with Surround SCM and choose Properties. The Properties of Workspace dialog box opens.
- Click the Source Control tab.
- Select Surround SCM SCCI from the Source Control System list.
- Enter the User ID to connect to Surround SCM.
- Click Browse. You are prompted to create an association between the local root folder and a repository in Surround SCM.
Note: You may not be prompted to create an association if the workspace local root folder is already associated with a repository in Surround SCM as a working directory. Surround SCM associates the workspace with that repository.
- Click Fix. The Surround SCM Repository Browser opens.
- Click Create Repository to create a new repository or select an existing repository to associate with the site. Unless you already have a repository to associate with the site, we recommend creating a new repository to avoid any working directory conflicts.
- To create a new repository, enter the repository name in the Create Repository dialog box. The working directory is automatically set to the workspace local root folder and should not be changed. Click OK to create the repository.
- To use an existing repository, you must first change the working directory for that repository to the local root folder for the site for the integration to work properly. Right-click the repository, choose Set Working Directory, and select the local root folder.
- Click OK to close the repository browser. The project name used in the Source Control tab for the workspace properties is set to SurroundSCMScci.
- Optionally set any additional Source Control options. Refer to the PowerBuilder documentation for more information.
Performing Surround SCM actions
To perform Surround SCM actions, right-click the files to work with and choose an action.
You can individual files or an entire workspace to source control. Files in the workspace explorer with a plus sign next to them are not under source control.
- Right-click the file or workspace to add to Surround SCM and choose Add to Source Control. The Add to Source Control dialog box opens.
- Click Advanced to specify where to add the files and click OK. The files are added to Surround SCM.
Get files when you want to view a file in PowerBuilder but do not need to make any changes. You can perform gets at the target level or file level.
- Right-click the file or target and choose Get Latest Version. The Get Latest Version dialog box opens.
Note: If you want to get multiple files but not all the files, select the target. In the Get Latest Version dialog box, you can Ctrl+Click the files to get.
- Click Advanced to specify where to retrieve the files to.
- Click OK. A read-only copy of the file is created in the specified directory.
Checking out files
Check out files when you need to modify them.
- Right-click the file or target and choose Check Out. The Check Out Files dialog box opens.
- Enter any comments and select any additional options.
- Click OK. The file is checked out.
Checking in files
Check in files with changes to remove the lock on the files and make the changes available to other users.
- Right-click the file or target and choose Check In. The Check In Files dialog box opens.
- Enter any comments and select any additional options.
- Click OK. The file is checked in.
Undoing check out
If you modify a checked out file but decide you do not want to save the changes, you can undo the check out. This discards any changes made to the file and checks in the file to the server.
- Right-click the file or target and choose Undo Check Out. The Undo Check Out Files dialog box opens.
- Select a File Overwrite option.
- Click OK. The file is no longer checked out.
You can remove files from source control.
- Right-click the file or target and choose Remove from Source Control. The Remove Files and Repositories dialog box opens.
- Enter any comments and select any options.
- Click OK. The file is removed from Surround SCM.
Viewing files differences
You can diff files to compare, accept, or reject differences between two files.
- Right-click the file or target and choose Show Differences. The Differences dialog opens.
- Select the files and versions to compare and click Differences. The differences utility starts.
Viewing file history
You can view a source file's history and work with historical file versions.
- Right-click the file or target and choose Show History. The History dialog box opens. You can view historic version information and perform actions on historic versions.
- Click Close to close the history.
Viewing file properties
You can view Surround SCM file properties from PowerBuilder. View the file properties to view the branch and repository the file or target is associated with.
- Right-click the file or target and choose SCC Properties. The Properties dialog box opens.
- Click the tabs to view file information.
- Click OK to close the Properties dialog box.
Refreshing file status
If you make changes to a file outside of PowerBuilder, you can refresh the file to update its status. For example, if you check out a file from the Surround SCM Client, it is not displayed as checked out in PowerBuilder unless you refresh the file status or until the automatic refresh occurs.
- Right-click the file or target to refresh and choose Refresh Status. The file status is refreshed.
When PowerBuilder requests an action from Surround SCM, it requires a license. It uses the license associated with the user ID set up in the workspace source control properties.
When configuring the status refresh rate in the source control properties of the workspace, keep in mind that even refreshing a file status requires a license. If you have PowerBuilder open but are not performing any source control options, a license may still be locked because of the status refresh operation.
Surround SCM is not displayed as an active SCM provider
Edit the registry to help PowerBuilder locate Surround SCM.
- Using the Registry Editor (regedit), go to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider key.
- Note the value of the ProviderRegKey string. For example, Software\Seapine Software\Surround SCM\Scci.
- Go to HKEY_LOCAL_MACHINE.
- Make sure the following strings exist and point to the correct location:
- SCCServerName—String value is ‘Surround SCM’
- SCCServerPath—String value is the location of the Surround SCM SCCI.dll in the Surround SCM application directory. For example, C:\Program Files\Perforce\Surround SCM\Surround SCM SCCI.dll.
Surround SCM files are not displayed correctly in PowerBuilder
- The PowerBuilder workspace may not be configured correctly. Make sure the workspace points to a Surround SCM branch or repository that exists on the Surround SCM Server you are connecting to. To check this information, right-click a file and select SCC Properties.
- The branch or repository may point to an invalid working directory. Make sure the working directory for the repository associated with the workspace points to the same local root folder as the workspace.
- The local .MySCMServerInfo file may be out of sync. PowerBuilder uses the .MySCMServerInfo file to determine where to look for files in Surround SCM. Go to the directory where the Surround SCM files exist and make sure the .MySCMServerInfo file data points to the correct branch or repository. If it is points to an incorrect branch or repository, delete the .MySCMServerInfo file and refresh the files in PowerBuilder to regenerate it.