Any object added or checked in to 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 PocketBuilder workspace resides.
Before developers can start work on PocketBuilder 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 PKLs and target (PKT) 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 PKLs listed in a target library list be present on the local machine. For source control purposes, all PKLs in a target should be in the same local root path, although they could be saved in separate subdirectories. PKWs and PKLs are not stored in source control unless they are added from outside the PocketBuilder SCC API. They cannot be checked in to or out of source control using the PocketBuilder SCC API.If you are sharing PKLs in multiple targets, you can include the shared PKLs 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 PKL 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.
Getting the latest version of all targets in a workspace For small projects, instead of requiring the project manager to distribute PKLs 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 PKLs and complicated inheritance schemes.
Ongoing maintenance tasks of a project manager typically include:
Distributing any target (PKT) files and PKLs 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 PKL mapping files (PKGs) do not get out of sync
For information about the PKG files, see “Editing the PKG 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 PocketBuilder, 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 PocketBuilder. (Otherwise, the target PKLs may need to be manually rebuilt and regenerated.)
For more information about getting the latest version of objects in source control, see “Synchronizing objects with the source control server”.