User defined triggers
vscRegUserTrigger
Arguments
s_event - the VersIC event to attach the trigger to
t_userTrigger - the user-defined trigger procedure
[n_priority] - optional trigger priority [0-highest]
Description
Register a user trigger for the given event
Returns
priority of the register trigger (integer)/nil
Pre-trigger usage
If a pre-trigger returns nil the current operation will be halted
Simple example of a preCheckin trigger, just prints a message and returns t
procedure( userPreCheckinTrigger( @key dirs message logfile )
printf("In userPreCheckinTrigger\n")
t
); procedure userPreCheckinTrigger
vscRegUserTrigger( 'preCheckin "userPreCheckinTrigger" )
Post-trigger usage
Simple example of a postCheckin trigger, just prints a message
procedure( userPostCheckinTrigger( @key dirs revision message )
printf("In userPostCheckinTrigger\n")
); procedure userPreCheckinTrigger
vscRegUserTrigger( 'postCheckin "userPostCheckinTrigger" )
Other user trigger functions
vscUnregUserTrigger(event trigger) - unregister a user-defined trigger
vscClearUserTriggers() - unregister all user-defined triggers
vscListUserTriggers() - list user-defined triggers
vscListUserEvents() - list events for which user triggers can be registered
Available triggers
preCheckout
Arguments
?dirs - (list of strings) the files/directories to be checked out
Return Value
nil - stop the checkout
Any other return value will be ignored
preCheckin
Arguments
?dirs - (list of strings) the files/directories to be checked in
?message - (string) the checkin message
?logfile - (string) path to file containing an extended checkin message
Your preCheckin procedure must accept these key arguments explicitly or implicitly using @rest
Return Value
nil - stop the checkin
<string> - will used as the commit message instead of the original message
Any other return value will be ignored
postCheckin
Arguments
?dirs - (list of strings) the files/directories that were checked in
?message - (string) the checkin message
?logfile - (string) path to file containing an extended checkin message
?revision - (string) the change/revision number created by this checkin
Your postCheckin procedure must accept these key arguments explicitly or implicitly using @rest
Return Value
The return value is ignored
preCopy
Arguments
?from - list of objects to copy from
?to - list of objects to copy to
Return Value
nil - stop the copy
Any other return value will be ignored
postCopy
The postCopy trigger is available only on cell and cellview copies. When using the Copy Cell or Copy View form the trigger will be called once after all the copies are complete and before checkin (if set)
Arguments
?copies - (list of lists) successful copy targets
cell - ("libname" "cellname")
cellview - ("libname" "cellname" "viewname")
libfile - ("libname" "" "" "filename")
cellfile - ("libname" "cellname" "" "filename")
?message - (string|nil) checkin message
Your postCopy procedure must accept these key arguments explicitly or implicitly using @rest
Return Value
nil - the copied data will not be checked in
Any other return value will be ignored.
postLocal
The postLocal trigger is called after one or more IPs are switched from Refer mode to Local mode
Arguments
ips - list of ips that were switched to local mode
Return Value
The return value is ignored.
postRefer
The postRefer trigger is called after one or more IPs are switched from Local mode to Refer mode
Arguments
ips - list of ips that were switched to refer mode
Return Value
The return value is ignored.