Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-16-2006, 08:47 AM
marscheese marscheese is online now
Registered User
 
Join Date: 06-16-2006
Posts: 2
Exclamation Trouble with Source Safe Get Files

So in the build I'm setting up, I get files from Source Safe.

In the "flags" tab under properties, when I click the "skip" option for "Handling of writeable files", it doesn't seem to work.

If I check out a file from SourceSafe (thus making the file writable on my machine), and try running the build, I get this error:

"A writable copy of c:\ProSolv\Build\UTILITIES\ServiceLib\ServiceLib.d sp already exists

Process completed with exit code 100"

I'm confused, because this option is supposed to stop this exact sort of thing from happening. If there are no checked out files, then there is no error. Using the other options (such as replacing the file instead of skipping it) seem to work just fine.

I don't think there is anything I am doing wrong, but if there are any suggestions, or if this is some sort of bug, I would like to know. Thanks in advance.
Reply With Quote
  #2  
Old 06-16-2006, 12:31 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
It's just how VSS works.

http://www.visualbuild.com/Manual/vssflagstab.htm

"Handling of writeable local files: ...'Skip' will skip any local writeable files, and not replace with the version from the database (the action will also fail in this case since the VSS command-line tool will return a non-zero exit code)..."

Technically, skip means skip and treat as an error, but it's probably reasonable behavior, since the local file may be different from the one in VSS.

You could mark the step to ignore failure or parse LASTSTEP_OUTPUT in the step's vbld_StepDone event and set the status to success as appropriate.
http://www.visualbuild.com/Manual/scriptevents.htm
http://www.visualbuild.com/Manual/systemmacros.htm
Reply With Quote
  #3  
Old 08-11-2006, 01:59 PM
TwoSixTwo TwoSixTwo is online now
Registered User
 
Join Date: 08-11-2006
Posts: 4
We have the same problem.

But first let me say that this tool is excellent and has made my job much easier. We just bought a site license so that all of our developers can benefit from a reliable build process.

The skip exits with an error code of 100. It stops on the first writeable file. The old dos scripts we used would not exit, but move on to the next file in the sourcesafe project. That's the behavior I'm after.

If we ignore, it won't get any subsequent files.
There is 'Treat exitcode of 1 as successful'. Is there a way that I can get it to pick up where it left on exit code of 100? Or can I make it ignore exit codes of 100?

Any help would be appreciated. Thanks.
Reply With Quote
  #4  
Old 08-12-2006, 07:38 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Testing the Get step in VStudio.bld (after changing the 'Handling of local writeable files' option on the Flags tab to Skip), it gets all read-only files and only skips writeable files. If your step is not doing that, compare it with ours (or check the 'Show command-line...' checkbox on the Options tab of the SourceSafe action, build the step again, and compare with the one in your batch file/script).

To ignore exit code 100, either mark the step to continue on failure (this doesn't affect the behavior the ss.exe itself--see above), or use the following VBScript code in the step's vbld_StepDone script event:

Code:
If Step.BuildStatus = vbldStepStatFailed And _
   InStr(vbld_AllMacros()("LASTSTEP_OUTPUT"), "Process completed with exit code 100" & vbCrLf) > 0 Then
	Step.BuildStatus = vbldStepStatSucceeded
End If
http://www.visualbuild.com/Manual/scriptevents.htm
Reply With Quote
  #5  
Old 08-15-2006, 02:16 PM
TwoSixTwo TwoSixTwo is online now
Registered User
 
Join Date: 08-11-2006
Posts: 4
Talking

Thanks for your help. I did see where it gets all of the read-only files and skips the writeables. It behaves as described. I was confusing the exit code message with failure because I only had one writeable file.

Thanks again for the prompt reply. The code snippet was just what I needed. Now the step won't have a big, honking failure status.

One correction: the InStr test is >= 0 not just > 0
Reply With Quote
  #6  
Old 08-15-2006, 04:28 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Hmmm, I'm pretty sure InStr returns 0 if the string is not found and 1+ if found, but whatever works for you. Also, since ss.exe returns exit code 100 for just about every error, just marking the step to continue on failure and not build failure steps is about the same difference (you can get fancier and parse the output for certain error strings if you're really particular).
Reply With Quote
  #7  
Old 02-25-2009, 04:59 PM
brizeka brizeka is online now
Registered User
 
Join Date: 07-21-2004
Location: NJ
Posts: 6
It Does Not Work For Me

I am trying to implement the solution you have provided but have not been successful. When adding the code below the process always executes "MsgBox '2:' ". The text of LASTSTEP_OUTPUT does contain the text, as I can see it in the MsgBox display. Also, even after executing the "MsgBox '2:' " code, The Build Status is still "Failed". If I Build Next Step, only then does the status change. Is there something I am missing?

---< code >---
If Step.BuildStatus = vbldStepStatFailed And _
InStr(vbld_AllMacros()("LASTSTEP_OUTPUT"), "Process completed with exit code 100") = 0 Then
Step.BuildStatus = vbldStepStatSucceeded
MsgBox "1:" & Step.BuildStatus
End If

If Step.BuildStatus = vbldStepStatFailed Then
Step.BuildStatus = vbldStepStatSucceeded
MsgBox "2:" & Step.BuildStatus & vbld_AllMacros()("LASTSTEP_OUTPUT")
End If
Reply With Quote
  #8  
Old 02-26-2009, 10:29 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Since ss.exe returns exit code 100 for just about every error, marking the step to continue on failure and not build failure steps will have the same effect.
Reply With Quote
Reply


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 12:38 AM.


Copyright © 1999-2023 Kinook Software, Inc.