Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-20-2005, 02:07 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
VSS History to File

Hello,

I have a build step based on one of your VSS samples that displays the history based on a label. I would like to save this output into its own text file (in addition to the regular build log). Is there a way to do this?

Thanks in advance!
Derek
Reply With Quote
  #2  
Old 01-20-2005, 03:28 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Put the following in the 'Additional command-line options' field on the SourceSafe action's Options tab:

"-O&c:\out.txt"

This will redirect the output to the file specified [1]. Then add the following in the step's script code (Script Editor button | Step tab) to also get the contents logged in the build:

Function vbld_StepDone()
If vbld_FSO.FileExists("c:\out.txt") Then
Builder.LogMessage vbld_GetFileContents("c:\out.txt")
End If
End Function

http://msdn.microsoft.com/library/de...ne_SwitchO.asp
Reply With Quote
  #3  
Old 01-20-2005, 03:58 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
Outstanding support and response time!

The VSS history to log is now working, but not the step of injecting the history into build log.

In my case, here's the VSS additional command-line:
-O&%PROJDIR%\F6TesTDotNetPort.root\F6TesTDotNetPort \%BUILD_HISTORY_LOG%

In the Script Editor Step tab, I have this:
Function vbld_StepDone()
If vbld_FSO.FileExists("%PROJDIR%\F6TesTDotNetPort.ro ot\F6TesTDotNetPort\%BUILD_HISTORY_LOG%") Then
Builder.LogMessage vbld_GetFileContents("%%PROJDIR%\F6TesTDotNetPort. root\F6TesTDotNetPort\%BUILD_HISTORY_LOG%")
End If
End Function

Any idea why it's not firing the StepDone call?

Thanks!
Derek
Reply With Quote
  #4  
Old 01-20-2005, 04:08 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Macros (%name%) aren't expanded in step script code. Change the code in the script event to

Function vbld_StepDone()
fname = Application.ExpandMacrosAndScript("%PROJDIR%\F6Tes TDotNetPort.root\F6TesTDotNetPort\%BUILD_HISTORY_L OG%")
If vbld_FSO.FileExists(fname) Then
Builder.LogMessage vbld_GetFileContents(fname)
End If
End Function


See http://www.visualbuild.com/Manual/?scripteditor.htm for more details.
Reply With Quote
  #5  
Old 01-20-2005, 04:25 PM
dprice dprice is online now
Registered User
 
Join Date: 01-19-2005
Posts: 13
That was it! Thanks for all the help.
Derek
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 08:26 AM.


Copyright © 1999-2023 Kinook Software, Inc.