Checking objects out from source control – PB Docs 2017

Checking objects out from source control

What happens on checking out an
object

When you check out an object, PowerBuilder:

  • Locks the object in the archive so that no one else can
    modify it — unless your source control system permits multiple
    user checkouts

  • Copies the object to the directory for the target to which
    it belongs

  • For a PowerScript object, compiles the object and
    regenerates it in the target PBL to which it is mapped

  • Displays a check mark icon next to the object in your
    System Tree and in your Library painter to show that the object
    has been checked out

Checking out multiple
objects

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

  • Select multiple files contained in the target

  • Check out the target file only

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 PowerBuilder
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, PowerBuilder does not include
this object in the list view of the Check Out dialog box.

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. 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.

By default, PowerBuilder recognizes shared checkouts from SCC
providers that support multiple user checkouts. PowerBuilder 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. You
can check out an object in shared mode even though another user has
already checked the object out.

Managing multiple user check-ins

If you allow multiple user checkouts, the SCC administrator
should publish a procedure that describes how to merge changes to
the same object by multiple users. Merge functionality is not
automatically supported by the SCC API, so checking in an object
in shared mode might require advanced check-in features of the
source control system. Merging changes might also require using
the source control administration utility instead of the
PowerBuilder user interface.

If your SCC provider permits multiple user checkouts, you can
still ensure that an item checked out by a user is exclusively
reserved for that user until the object is checked back in, but only
if you add the following instruction to the Library section of the
PB.INI file:

After you add this PB.INI setting, or if your SCC provider
does not support multiple user checkouts, you will not see the
compound icons with red check marks, and all items will be checked
out exclusively to a single user. For source control systems that
support multiple user checkouts, you can re-enable shared checkouts
by setting the SccMultiCheckout value to 1 or -1.

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 (that you access by
clicking the Advanced button in the Check Out dialog box). When you
select an earlier version, PowerBuilder 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 checkout, you can select Yes To All or No
To All.

If 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
.

To 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 PBL 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.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x