Any object added or checked into source control should be usable by all developers who have access permissions to that object in source control. This requires that the local paths for objects on different machines be the same in relation to the local root directory where the PowerBuilder workspace resides.
Before developers can start work on PowerBuilder objects in a workspace under source control, a project manager usually performs the following tasks:
Sets up source control projects (and archive databases)
Assigns each developer permission to access the new project
Sets up the directory structure for all targets in a project
Ideally, the project manager should create a subdirectory for each target. Whatever directory structure is used, it should be copied to all machines used to check out source-controlled objects.
Distributes the initial set of PBLs and target (PBT) files to all developers working on the project or provides a network location from which these files and their directory structure can be copied.
PowerScript targets require that all PBLs listed in a target library list be present on the local machine. For source control purposes, all PBLs in a target should be in the same local root path, although they could be saved in separate subdirectories. PBWs and PBLs are not stored in source control unless they are added from outside the PowerBuilder SCC API. They cannot be checked into or out of source control using the PowerBuilder SCC API.
If you are sharing PBLs in multiple targets, you can include the shared PBLs in a workspace and in targets of their own, and create a separate source control project for the shared objects. After adding (registering) the shared PBL objects to this project, you can copy the shared targets to other workspaces, but the shared targets should not be registered with the corresponding projects for these other workspaces. In this case, the icons indicating source control status for the shared objects should be different depending on which workspace is the current workspace.
For small projects, instead of requiring the project manager to distribute PBLs and target files, developers can create targets in their local workspaces having the same name as targets under source control. After creating a source control connection profile for the workspace, a developer can get the latest version of all objects in the workspace targets from the associated project on the source control server, overwriting any target and object files in the local root path.
Unfortunately, this does not work well for large PowerScript projects with multiple PBLs and complicated inheritance schemes, but it can be used for Web targets. A better way for developers to add source-controlled Web targets to their workspaces is to use the Source Controlled Web Target wizard on the Target page of the New dialog box.
Ongoing maintenance tasks of a project manager typically include:
Distributing any target (PBT) files and PBLs that are added to the workspace during the course of development, or maintaining them on a network directory in an appropriate hierarchical file structure
Making sure the PBL mapping files (PBGs) do not get out of sync
For information about the PBG files, see “Editing the PBG file for a source-controlled target”.
Connections from each development machine to the source control project can be defined on the workspace after the initial setup tasks are performed.
Each user can define a local root directory in a workspace connection profile. Although the local root directory can be anywhere on a local machine, the directory structure below the root directory must be the same on all machines that are used to connect to the source control repository. Only relative path names are used to describe the location of objects in the workspace below the root directory level.
After copying the directory structure for source-controlled PowerScript targets to the local root path, developers can add these targets to their local workspaces. The target objects can be synchronized in PowerBuilder, although for certain complex targets, it might be better to do the initial synchronization through the source control client tool or on a nightly build machine before adding the targets to PowerBuilder. (Otherwise, the target PBLs may need to be manually rebuilt and regenerated.)
Developers can use the Source Controlled Web Target wizard to add Web targets to their workspaces. The wizard creates subdirectories in the local root path and populates the subdirectories with the latest version of the Web target source files from the source control server.
For more information about getting the latest version of objects in source control, see “Synchronizing objects with the source control server”.