PBORCA_SccSetTarget

Description

Retrieves the target file from source control, passes the application object name to ORCA, and sets the ORCA session library list.

Syntax

INT PBORCA_SccSetTarget ( HPBORCA hORCASession, 
   LPTSTR pTargetFile,
   LONG       lFlags,
   PBORCA_SETTGTPROC pSetTgtProc,
   LPVOID pUserData );

Argument

Description

hORCASession

Handle to previously established ORCA session

pTargetFile

Target file name

lFlags

Allows you to control the behavior of the target operation (see Usage section below)

pSetTgtProc

Pointer to the user-defined callback function

pUserData

Pointer to a preallocated data buffer


Return value

INT.

Usage

This method takes the place of PBORCA_SetLibraryList and PBORCA_SetCurrentAppl in a traditional ORCA application.

In addition to retrieving the target file from source control and setting the application object and library list, PBORCA_SccSetTarget calls a user-defined callback function one time for each library in the library list. This lets you know which libraries will be refreshed by default and gives you an opportunity to call PBORCA_SccExcludeLibraryList if you think that specific shared libraries have already been refreshed by a previous task.

You assign the lFlags argument to set the refresh behavior on target libraries you retrieve from source control:

Flag

Description

PBORCA_SCC_OUTOFDATE

Performs comparisons to determine if objects residing in the PBL are out of sync. When used with PBORCA_SCC_IMPORTONLY, only objects that differ from the source residing on the local project path are refreshed. When PBORCA_SCC_IMPORTONLY is not set, only objects that are out of date with the SCC repository are refreshed. PBORCA_SCC_OUTOFDATE and PBORCA_SCC_REFRESH_ALL are mutually exclusive.

PBORCA_SCC_REFRESH_ALL

Target libraries are completely refreshed. When used with PBORCA_SCC_IMPORTONLY, source code is imported directly from the local project path. When PBORCA_SCC_IMPORTONLY is not set, then the latest version of all objects is first obtained from the SCC provider and then imported to the target libraries.

PBORCA_SCC_IMPORTONLY

Indicates that all the necessary objects to rebuild the target application already exist on the local project path. Set this flag if you have previously refreshed the local path using the SCC vendor's administration tool. PBORCA_SCC_IMPORTONLY is required if you previously called PBORCA_SccConnectOffline during this ORCA session. PBORCA_SCC_IMPORTONLY is particularly useful to rebuild a target from a specific SCC version label or promotion group.

PBORCA_SCC_EXCLUDE_CHECKOUT

Provides a mechanism to refresh local targets through a batch job that does not require user intervention. Prevents objects that are currently checked out from being overwritten. When used along with PBORCA_SccConnect, the checkout status is obtained directly from the SCC provider. When used with PBORCA_SccConnectOffline, the checkout status is obtained from the workspace_name.PBC file. For offline processing, the workspace name is obtained from a previous call to PBORCA_SccGetConnectProperties.


If target libraries and directories do not exist in the local project path specified by PBORCA_SccConnect, then these directories and PBL files are created dynamically by the PBORCA_SccSetTarget call.

SccSetTarget does an implicit PBORCA_SessionSetLibraryList and PBORCA_SessionSetCurrentAppl. After you call PBORCA_SccSetTarget (and presumably PBORCA_SccRefreshTarget), you can do other work that requires a current application and an initialized library list, such as creating PBDs and EXEs. This is more efficient than calling PBORCA_SccClose, then reinitializing the library list and current application to create the PBDs and EXEs.

See also

PBORCA_SccConnect

PBORCA_SccConnectOffline

PBORCA_SccGetConnectProperties

PBORCA_SccRefreshTarget