PDA

View Full Version : Working Folder Bug in VBPro?


thomasst
03-09-2004, 08:08 PM
I created a SourceSafe action in my .bld file, and left the Path for local files empty. The VBPro help file states the following:
"Path for local files or label to apply: For all operations except Label, this specifies the drive+path to place files that are retrieved from the database; if the field is left empty, the user's current working folder settings will be used instead (for reliability, especially with automated builds, it is highly recommended that the path be specified here). For Label operations, enter the label to apply in this field."
I am automating builds and I want to leave this field empty so that this step will use my working folder (ignoring the all-knowing help file's advice). I have done everything in VSS from opening the VSS database with the correct account and setting working folders to going into the ss.ini files in the correct 'user' folder of the VSS database. I have made SURE that the working folders have been set correcltly.
Here's the problem:
No matter what I set the VSS working folder to, If 'Path for local files' is left empty, SourceSafe Action will 'get' the files to the directory that contains the .bld file in use. Is this what the help manual means by 'the user's current working folder settings'?
Please, if anyone knows, let me know if it is possible to just set working folders in VSS and then make one SourceSafe action that has multiple lines of 'Projects and files to process' and have each project go to its' respective working folder.

kinook
03-09-2004, 11:38 PM
If you don't specify a folder, then the current directory for the SourceSafe action will be whatever the current folder is at the time that step runs (which will depend on the current directory when VisBuildPro was started, 'Tools | Application Options | General | Set current directory to project folder after loading or saving projects', and/or whether a Set Current Dir action was previously executed). The VSS Get help [1] states:

The Get Latest Version command places files into the current folder. Used recursively on a project (the -R option), VSS gets all the files in the project and subprojects, and places them into subfolders of the same name. If you set the SS.INI variable Force_Dir to Yes, subprojects go into their respective working folders instead of into subfolders of the same name.

So your best bet would be to set the VSS Force_Dir INI value (you could also try setting the current directory in VBP before the SourceSafe step, but it might not be enough).

[1] http://msdn.microsoft.com/library/en-us/guides/html/vsgrfSS_Get.asp

kewalaka
02-08-2007, 08:26 AM
Hi,

There is a way around the problem you have highlighted.

I assume you have a VSS user that you use to do the builds. Log into the necessary sourcesafe database with this account, go to Tools, Options and select the Command Line Options tab. Tick the "Assume working folder based on current project".

You need to make sure that in VBPro, under the Flags tab in the sourcesafe step, that the "Answer 'No'" tickbox is not checked, otherwise it will not create the folders for you.

Not bad for someone just trying out the demo, do I get a discount for answering your support questions :) ?

This solution appears to work quite well for us as frequently our projects are built from lots of components scattered around the sourcesafe tree, and this feature lets us get them all in one step and build the directory structure.

I'm using VSS 6.0d and VBPro 6.2a.

cheers,
Stu