PBORCA_SccResetRevisionNumber

Description

Call this function to reset the revision number for an object. This function is useful only in applications using SCC providers that implement the SccQueryInfoEx extension to the SCC API.

Syntax

INT PBORCA_SccResetRevisionNumber ( HPBORCA hORCASession, 
   LPTSTR  lpszLibraryName,
   LPTSTR       lpszEntryName,
   PBORCA_TYPE  otEntryType,   
   LPTSTR  lpszRevisionNum );

Argument

Description

hORCASession

Handle to previously established ORCA session.

lpszLibraryName

Absolute or relative path specification for the PBL file containing the object for which you want to reset the revision number.

lpszEntryName

Pointer to a string whose value is the name of the object without its .sr? extension.

otEntryType

A value of the PBORCA_TYPE enumerated data type specifying the object type of the entry being imported. Values are:

PBORCA_APPLICATION

PBORCA_BINARY

PBORCA_DATAWINDOW

PBORCA_FUNCTION

PBORCA_MENU

PBORCA_PIPELINE

PBORCA_PROJECT

PBORCA_PROXYOBJECT

PBORCA_QUERY

PBORCA_STRUCTURE

PBORCA_USEROBJECT

PBORCA_WINDOW

lpszRevisionNum

A string value or NULL. NULL causes the current revision number in the PBL to be deleted.


Return value

INT. Typical return codes are:

Return code

Description

0       PBORCA_OK

Operation successful

-1      PBORCA_INVALIDPARMS

Invalid parameter list (if lpszLibraryName or lpszEntryName is null)

-7      PBORCA_LIBIOERROR

Unable to open PBL for read/write access


Usage

You can call this function whether or not you are connected to source control. The PBORCA_SccResetRevisionNumber function changes the object revision number that is stored as metadata in the PowerBuilder library that you assign in the lpszLibraryName argument. The revision number is changed in the object source on the desktop machine, not in the source control repository. The library where the object resides does not have to be in the current library list.

Typically you would call PBORCA_SccResetRevisionNumber if your ORCA program externally modifies the object source in the PBL and one of the following is also true:

  • The ORCA program has imported a specific revision of an object into the PBL through a PBORCA_CompileEntryImport call. If the ORCA program knows the exact revision number that was imported, that revision number should be specified in the lpszRevisionNum argument. If the exact revision number is unknown, the ORCA program should still call PBORCA_SccResetRevisionNum and set lpszRevisionNum to NULL.

  • The ORCA program is externally performing the equivalent of an SCC check-in by exporting existing object source from the PBL through a PBORCA_LibraryEntryExport call and checking the object source into the SCC repository itself. To complete the job, the ORCA program must obtain the new revision number from the SCC repository and call PBORCA_SccResetRevisionNumber. After you do this, the object source residing in the PBL is associated with the correct revision number in the SCC repository.

See also

PBORCA_CompileEntryImport

PBORCA_LibraryEntryExport