DirectApply

(VTScada-Layer function. Must be called with a leading backslash.)

Description: Applies a set of changes directly to the repository, without disturbing existing (non-conflicting) changes already on either branch.
Warning: This function should be used only by advanced programmers.
Returns: Module
Usage: Script Only.
Function Groups: Configuration Management
Related to: CommitEditedFiles
Format: LayerModule\DirectApply(AlreadyHasLock, LocalChangeSet, RSema, pComment)
Parameters:  
AlreadyHasLock
Required Boolean. Set TRUE when we already have the working copy lock.
RSema
Required. Repository semaphore, if already held by the caller.
CallBack
Required. Module name of the caller performing the changes.
FileSet
The set of files to be changed, identified using a path relative to the working-copy.
User
The user ID that is to be applied to the change.
Comment
Any text value that is the comment to be stored in the version log for this change.
pFail
A pointer to a Boolean. This will be set TRUE on failure.
Comments:

This function uses a callback system to acquire a set of changes against the repository tip versions of a file or group of files (both the local and deployed versions) and then applies those changes directly to the local and deployed repository tips without altering the working copy.

The changes are then applied to the working copy as a result of the repository update. The primary purpose of this operation is to allow changes to a file to be deployed without also deploying any existing local changes to the same file. The local version must also be updated such that the file is updated correctly when the current local and deployed tips differ - otherwise conflicts could result when the repository attempts to rationalize the two.

DirectApply is used to distribute operation changes, notes, security information, and other data for which it is not appropriate that one machine may be configured differently than its peers. It should not be used for normal configuration changes. To make all configuration changes deploy immediately set the "Automatically Deploy" flag in the CM Information panel.

The callback definition follows:

Callback (
   DeployChangeSet   { Set of deploy buffers, make changes to these  };     
   LocalChangeSet    { Set of local buffers, make changes to these   };
   RSema             { Repo semaphore                                };
   pComment          { Comment pointer allowing late editing         };
) 

This module launches a worker module into the Layer so that the operation is not interrupted by this module's caller being slain. In the case that the current machine is not supporting an open local branch the LocalChangeSet callback parameter will be invalid.

Examples:

none provided