On Windows platforms (Windows 2000 and later), cvsnt can use the builtin active scripting support to produce simple scripts. Note: VBScript is deprecated in Windows 11 and Windows Server 2025.
To enable this functionality, enable the 'ActiveScript Plugin' using the CVSNT Server Control Panel, and cvs add a file to the checked out CVSROOT as follows:
script.vbs
for VBScript support
script.js
for JavaScript support
script.pl
for PerlScript support
script.rb
for RubyScript support
The scripting engine you intend to use must be installed on the server - only the VBScript engine is installed by default.
Available functions are as follows:
init(command, current_date, hostname, username, virtual_repository, physical_repository, session_id, editor, user_variable_array, client_version, character_set) close taginfo(message,directory, file_array, action, tag) verifymsg(directory, filename) loginfo(message, status, directory, change_array) history(history_type, workdir, revs, name, bugid, message, dummy) notify(message, bugid, directory, notify_user, tag, notify_type, file) precommit(name_list, message, directory) postcommit(directory) precommand(argument_list) postcommand(directory) premodule(module) postmodule(module) get_template(directory) parse_keyword(keyword, directory, file, branch, author, printable_date, rcs_date, locker, state, version, name, bugid, commitid, global_properties, local_properties) prercsdiff(file, directory, oldfile, newfile, diff_type, options, oldversion, newversion) rcsdiff(file, directory, oldfile, newfile, diff, diff_type, options, oldversion, newversion, added, removed)
Functions should return 0 if successful. Arguments are strings, except where the name ends in _list which are arrays of strings, or _array, which are associative arrays (name=value).
The exceptions to this is loginfo
, which is
passed an array of structures containing filename
,
rev_old
and rev_new
. Also the
get_template
and parse_keyword
functions, which are expected to return a string or
null
.
The script has access to a server object, called
Server
, which contains the following
functions:
Trace(tracelevel,message) Warning(message) Error(message)
An example of all these functions is available in the cvsnt source
tree, called script.vbs
in the
contrib_nt
directory.