This allows you to retrieve various information relevant to version control.
The topics in this section include:
This gets the version control system name.
IFileSpec* FileSpec - the file spec to get info for.
ICodeWarriorVCSState** VCSState - the state information.
Allows you to check a file in to revision control.
IFileSpecCollection* fileSpecCollection - the file spec collection to check in.
Allows you to check a file out from revision control.
IFileSpecCollection* fileSpecCollection - the file spec collection to check out.
'This script accepts as commandline parameter the
`name of the project to be opened and then checks out
`a file from the project.
'The absolute path needs to be included. Ex:
'wscript thisscript.vbs "C:\testproejcts\test1.mcp"
'If no command line arguments are given, the script
`prompts for the absolute path of the project file to be opened.
'If specified the script tries to open the
`project, else it opens "c:\testprojects\test1.mcp'
'
'This script opens the project and selects the files
`(if on filelist pane or link order pane) that belong to the
'default target
option explicit
'*******Variable declaration
dim codewarrior
dim vcsName
dim vcs
dim filename
dim filespec
dim filespeccollection
'****** Script ********
'Create automation app object
set codewarrior = CreateObject("CodeWarrior.CodeWarriorApp")
MsgBox "App Created"
set vcs = codewarrior.VersionControl
filename = "d:\cwpro4\scripts\createproject.vbs"
set filespec = CreateObject("CodeWarrior.FileSpec")
filespec.Name = filename
set filespeccollection = CreateObject("Metrowerks.FileSpecCollection.1")
filespeccollection.Add( filespec )
vcs.UndoCheckOut( filespeccollection )
IFileSpecCollection* fileSpecCollection - the file spec collection to unlock.
Allows you to get the file collection.
IFileSpecCollection* fileSpecCollection - the file spec collection.
IFileSpecCollection* fileSpecCollection - the file spec collection on which to undo the check out.
Check to see if there is a connection to the VCS.
VARIANT_BOOL pval - true if connected to the VCS, else false.