[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


ICodeWarriorVersionControl

This allows you to retrieve various information relevant to version control.

The topics in this section include:


Getting the Name - Name

This gets the version control system name.


Arguments

None


Return Value

BSTR* vcsName - the name.


Getting the Version Control State - GetVCSState


Arguments

IFileSpec* FileSpec - the file spec to get info for.


Return Value

ICodeWarriorVCSState** VCSState - the state information.


Checking in a File - CheckIn

Allows you to check a file in to revision control.


Arguments

IFileSpecCollection* fileSpecCollection - the file spec collection to check in.


Return Value

None


Checking out a File - CheckOut

Allows you to check a file out from revision control.


Arguments

IFileSpecCollection* fileSpecCollection - the file spec collection to check out.


Return Value

None


Example Usage

Checking Out a File:


'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 )


Unlocking a File - UnLock

Allows you to unlock a file.


Arguments

IFileSpecCollection* fileSpecCollection - the file spec collection to unlock.


Return Value

None


Getting the Collection - Get

Allows you to get the file collection.


Arguments

IFileSpecCollection* fileSpecCollection - the file spec collection.


Return Value

None


Undoing a Check Out - UndoCheckOut


Arguments

IFileSpecCollection* fileSpecCollection - the file spec collection on which to undo the check out.


Return Value

None


Connect to the VCS - Connect

Connects to the VCS.


Arguments

None


Return Value

None


Disconnecting from the VCS - Disconnect

Disconnects from the VCS.


Arguments

None


Return Value

None


Checking the Connection - IsConnected

Check to see if there is a connection to the VCS.


Arguments

None


Return Value

VARIANT_BOOL pval - true if connected to the VCS, else false.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 02, 2000