Checking objects out from source control

Enabling multiple user checkout

Checking out an object from a source control system usually prevents other users from checking in modified versions of the same object. By default, PocketBuilder assumes that any object checked out by a user is exclusively reserved for that user until the object is checked back in.

Some source control systems, such as Serena Version Manager (formerly Merant PVCS) and MKS Source Integrity, permit multiple user checkouts. In these systems, you can allow shared checkouts of the same object. PocketBuilder can recognize shared checkouts, but only if you add the following instruction to the Library section of the PK.INI file:

[Library]
SccMultiCheckout=1

After you add this PK.INI setting, PocketBuilder shows a red check mark as part of a compound icon to indicate that an object is checked out to another user in a shared (nonexclusive) mode. PocketBuilder allows you to check out an object with this compound icon, even though another user has already checked the object out.

NoteMultiple user checkouts If you configure the PK.INI file to allow multiple user checkouts, you must make sure that you have a way to manage updates to the same object by multiple users. The merge functionality is not supported by the SCC API, so either you must configure merge operations through the Advanced Check Out dialog box of the source control system, or you must merge the changes using the source control management system instead of the PocketBuilder user interface.

What happens

When you check out an object, PocketBuilder:

Checking out multiple objects

If you select the Check Out menu item for a PocketBuilder target that is not already checked out, and at least one of the objects in that target is available for checkout, PocketBuilder displays a dialog box that prompts you to:

If you select the multiple file option, or if the target file is already checked out, the Check Out dialog box displays the list of objects from that target that are available for checkout. A check box next to each object in the list lets you choose which objects you want to check out. By default, check boxes are selected for all objects that are not currently checked out of source control.

The Deselect All button in the Check Out dialog box lets you clear all the check boxes with a single click. When none of the objects in the list is selected, the button text becomes Select All, and you can click the button to select all the objects in the list.

You can also select multiple objects (without selecting a target) in the List view of the Library painter. The PocketBuilder SCC API does not let you check out an object that you or someone else has already checked out or that is not yet registered with source control. If you use multiple object selection to select an object that is already checked out, PocketBuilder does not include this object in the list view of the Check Out dialog box.

Creating a source control branch

If your source control system supports branching and its SCC API lets you check out a version of an object that is not the most recent version in source control, you can select the version you want in the Advanced Check Out dialog box. You access this dialog box by clicking the Advanced button in the Check Out dialog box. When you select an earlier version, PocketBuilder displays a message box telling you it will create a branch when you check the object back in. You can click Yes to continue checking out the object or No to leave the object unlocked in the source control project. If this is part of a multiple object check-out, you can select Yes To All or No To All.

NoteIf you want just a read-only copy of the latest version of an object Instead of checking out an object and locking it in the source control system, you can choose to get the latest version of the object with a read-only attribute. See “Synchronizing objects with the source control server”.

StepsTo check out an object from source control:

  1. Right-click the object in the System Tree or in a Library painter view and select Check Out from the pop-up menu

    or

    Select the object in a Library painter view and select Entry>Source Control>Check Out from the Library painter menu.

    The Check Out dialog box displays the name of the object you selected. For PowerScript objects, the object listing includes the name of the PKL that contains the selected object.

    If you selected multiple objects, the Check Out dialog box displays the list of objects available for checkout. You can also display a list of available objects when you select a target file for checkout. A check mark next to an object in the list marks the object as assigned for checkout.

  2. Make sure that the check box is selected next to the object you want to check out, and click OK.