Replacing CTRL+S in CF-Studio to integrate with CS-RCS
Author: Riwut Libinuko
Rating:
Rate this Resource
Visits: 2466
Discuss in Newsgroups
Hi, one of the most important thing in code development is code tracking. Yes, any changes to the code should be tracked down to the root, and even the deletion action should be able to be recovered. There are known procedure in such kind of Control System such as CVS, RCS, PRCS etc. CS-RCS is fully integrates into Windows Explorer, however it doesn't integrates with CF-Studio, unless we define script to do it. This script will demonstrate the capabilities of WSH, CF-Studio VTOM and CS-RCS command-line. At last you can replace the standard CTRL+S in CF-Studio to Save and Automaticaly Check-In to your repository.
Regards,
Riwut Libinuko
Glosarry: CS-RCS (http://www.componentsoftware.com ) is one of available tools to RCS your code. CF-Studio (http://www.macromedia.com) is a development tools for internet application.
Copyright & trademarks for all applications mentioned above are proprietary of the respective owner
'(c) Copyright 2003 - Riwut Libinuko cakriwut@yahoo.com 'Version 1.0 'Licensee granted for DataOn-ers, and readers of http://www.developersdex.com 'Any modification should be resubmitted to cakriwut@yahoo.com 'If you like the code, please send postcard or $1 to my parents ' Mr. Soetardjo , Jl. Gatot Subroto No. 216, Lumajang , Jatim - INDONESIA, 67352
Dim sRCSPath, sRepository '=== CUSTOMIZE YOURSELF ====
sRCSPath = "C:\Program Files\ComponentSoftware\CS-RCS\System\csrcs.exe" sRepository = \\[Shared Directory]\VersionControl
'=== NO CUSTOMIZATION =========== Sub Main Dim sCurrFile, sCmdParam, sComputer Dim oApp, oRegex Set oApp = Application Set oRegex = New regexp oRegex.Pattern = "([a-zA-Z]|\\)(\\|:)([a-zA-Z0-9]|\\)(.*)" sCurrFile= oApp.ActiveDocument.Filename If Not oApp.ActiveDocument.Save Then MsgBox "ERROR: Unable to save " + sCurrFile Exit Sub End If Set objFSO = CreateObject("Scripting.FileSystemObject") Set objDrive = objFSO.GetDrive(oRegex.Replace(sCurrFile,"$1$2"))
If objDrive.ShareName <> "" Then sRepository = sRepository + oRegex.Replace(objDrive.ShareName,"$2$3$4") + oRegex.Replace(sCurrFile,"$3$4,v") sCurrFile = objDrive.ShareName +oRegex.Replace(sCurrFile,"$3$4") Else sRepository = sRepository + oRegex.Replace(sCurrFile,"$3$1$3$4,v") End If sCmdParam = " Create " If oApp.DeploymentManager.FileExists(sRepository) Then sCmdParam = " Checkin " End If oApp.ShellToAppAndWait(sRCSPath + sCmdParam +""""+ sCurrFile + """") Set objFile = objFSO.GetFile(sCurrFile) If objFile.Attributes AND 1 Then objFile.Attributes = objFile.Attributes XOR 1 End If Set oApp = Nothing Set objFSO = Nothing Set oRegex = Nothing End Sub
Visit my guru profile
Visitor Comments
Be the first to rate this code sample!
|