Kinook Software Forum

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

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1  
Old 12-16-2003, 04:57 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
Cloak and Decloak SourceSafe Commands

It would be nice to have the Cloak and Decloak commands for the SourceSafe action. I know I can create a custom action for this, but I would be nice to have with the SourceSafe action.
Reply With Quote
  #2  
Old 12-16-2003, 05:52 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The Operation field of the SourceSafe action is editable, so you could try entering Cloak/Decloak there. From the SourceSafe action help topic:

Operation: The VSS operation to perform (required). Most common operations are available in the drop-down list. Other operations may also work but are not explicitly supported (if the operation does not work correctly via the action, a Run Program action can be created which uses the SSHELPER tool/macro directly -- see below). See the VSS help for details on the available operations.
Reply With Quote
  #3  
Old 12-16-2003, 07:26 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
Well, the cloak command is not working for me when adding it to the list. I may be able to play with it some more to get it to work, but it is not working with some of the command line parameters that are used. I will have to play with the options to see how it affects the command line parameters and to see if I can find a combination that works.

Have you considered adding an option that would allow you to edit the command line directly in the properties. I was thinking something along the lines of building the command line with the available options and displaying the command line in a disabled text box. You could have an option to edit the command line which would enable the text box and disable the other options as long as you are editing the command line directly. I understand that it may be a little more difficult to go back, but you could always just set it back to the last configuration set in the options. I think a good example is found in Outlook. If you try to filter the contacts in Outlook a property sheet is displayed. The last tab is named SQL. On this tab is a text box and a checkbox. The text box is disabled by default and displays the SQL statement for the selected option in the other tabs. If you check the check box the text box is enabled so you can edit the SQL directly, but you cannot go back to any other tabs while the check box is checked. I think this model would fit well here.
Reply With Quote
  #4  
Old 12-19-2003, 09:42 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The cloak/decloak commands are pretty simple [1], and since they only take 1 argument explains why they don't work with the SourceSafe action, which provides many standard arguments for the more complex commands. Run Program steps like this should work for you:

%SSHELPER% "drive+path to db" Cloak $/project/to/cloak

%SSHELPER% "drive+path to db" Decloak $/project/to/cloak

[1] http://msdn2.microsoft.com/en-us/lib...4z(VS.80).aspx
Reply With Quote
  #5  
Old 12-19-2003, 01:39 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
I am currently having problems using your suggestion. I got the following error the first time I tried it.

____________________
Building project step 'SourceSafe Cloak'...

SSHelper, Version 1.2
Copyright (C) 2000-2002 Kinook (TM) Software, Inc. All rights reserved.

No VSS database (srcsafe.ini) found. Use the SSDIR environment variable or run netsetup.

Process completed with exit code 100
Step 'SourceSafe Cloak' failed
Build ended.
____________________

And then I received this error each time I ran the step after the first time regardless of what I changed.

____________________
Building project step 'SourceSafe Cloak'...
Failed to create process: The directory name is invalid.
Step 'SourceSafe Cloak' failed
Build ended.
____________________

Here is the command line I am running.

%SSHELPER% %SSDIR_WEB% Cloak $/Interium/Development/InteriumLocal/CopyAndTransferEngagementStressTest

I have tried it with and without double quotes around the macro %SSDIR_WEB% and I get the same results. I am using the %SSDIR_WEB% macro in other SourceSafe actions so I know the directory is valid. I also double checked the SourceSafe project to make sure it was a valid project and it is.
Reply With Quote
  #6  
Old 12-19-2003, 03:21 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Make sure that you are specifying a path only (i.e., without \srcsafe.ini at the end) for your SSDIR_WEB macro. The SourceSafe action will strip that off if found, but SSHELPER doesn't.

I added the steps below in the SourceSafe.bld sample (right after the Open Database step) and they worked. I did notice a couple things:
1) you may also want to specify a username/password
2) those operations return an exitcode of 1 on success, so I changed the exit code range to include that.

<step action='Run Program' type='0'>
<command>%SSHELPER% "%SAMPLEDB%" Cloak $/Executables -y%SSUSER%,</command>
<indent type='3'>1</indent>
<name>Cloak</name>
<outputfrom type='3'>1</outputfrom>
<successcodes>0:1</successcodes>
</step>
<step action='Run Program' type='0'>
<command>%SSHELPER% "%SAMPLEDB%" Decloak $/Executables -y%SSUSER%,</command>
<indent type='3'>1</indent>
<name>Decloak</name>
<outputfrom type='3'>1</outputfrom>
<successcodes>0:1</successcodes>
</step>
Reply With Quote
  #7  
Old 01-05-2004, 02:26 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
I have tried your suggestions, but I am still having problems. Here is the latest command-line I have used:

%SSHELPER% "%SSDIR_WEB%" Cloak $/Interium/Development/InteriumLocal/AppCode -y%USERNAME%,

I tried it with and without the "-y%USERNAME%," option and received the following error in both cases:

Failed to create process: The directory name is invalid.
Reply With Quote
  #8  
Old 01-05-2004, 02:50 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
If you paste my sample steps into the SourceSafe.bld sample and build the project (F7), does it build correctly? You should get build output something like this for those steps:

Building project step 'Cloak'...

Cloaked project $/Executables.

Process completed with exit code 1
Building project step 'Decloak'...

DeCloak project $/Executables.

Process completed with exit code 1
Reply With Quote
  #9  
Old 01-05-2004, 03:25 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
Yes that worked. Here is the output when I copied and pasted your steps into the SourceSafe sample:

Building project step 'Cloak'...

SSHelper, Version 1.2
Copyright (C) 2000-2002 Kinook (TM) Software, Inc. All rights reserved.

Cloaked project $/Executables.

Process completed with exit code 1
Build successfully completed.


And here is the output from my cloak step:

Building project step 'SourceSafe Cloak'...
Failed to create process: The directory name is invalid.
Step 'SourceSafe Cloak' failed
Build ended.


It looks like a problem invoking SSHELPER, but I could not find a difference between the steps that you sent me and the steps I created. This seems really strange.
Reply With Quote
  #10  
Old 01-05-2004, 03:34 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
To help with the comparison, check 'Tools | Application Options | Logging | Log default property of each step', and also add /C to the SSHELPER command-lines, like:

%SSHELPER% /C "%SAMPLEDB%" Cloak $/Executables -y%SSUSER%

This will log both the SSHELPER command-line, and the subsequent ss.exe command-line (if it gets that far) with all macros expanded. For the sample db, I get:

Step default property 'command' = '"c:\progra~1\visbuildpro\Tools\SSHelper.exe" /C "c:\temp\VisBuildPro\VStudio\Database" Cloak $/Executables -yGuest,'

SSHelper, Version 1.2
Copyright (C) 2000-2002 Kinook (TM) Software, Inc. All rights reserved.

Command: "C:\Program Files\DevStudio6\Common\VSS\win32\ss.exe" Cloak $/Executables -yGuest,
Cloaked project $/Executables.

Process completed with exit code 1
Reply With Quote
  #11  
Old 01-05-2004, 03:58 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
Here is the output from the SourceSafe sample cloak step:

Building project step 'Cloak'...
Step default property 'command' = '"C:\Program Files\VisBuildPro\Tools\SSHelper.exe" /C "C:\DOCUME~1\SJIMME~1\LOCALS~1\Temp\VisBuildPro\VS tudio\Database" Cloak $/Executables -yGuest,'

SSHelper, Version 1.2
Copyright (C) 2000-2002 Kinook (TM) Software, Inc. All rights reserved.

Command: "C:\Program Files\Microsoft Visual Studio\VSS\win32\ss.exe" Cloak $/Executables -yGuest,

Process completed with exit code 1
Build successfully completed.


And here is the output from my cloak step:

Building project step 'SourceSafe Cloak'...
Step default property 'command' = '"C:\Program Files\VisBuildPro\Tools\SSHelper.exe" /C "\\ppcsw1\nt-g\SS_WEB" Cloak $/Interium/Development/InteriumLocal/AppCode -y<username>,'
Failed to create process: The directory name is invalid.
Step 'SourceSafe Cloak' failed

I changed the actual username on my cloak step for security reasons.
Reply With Quote
  #12  
Old 01-05-2004, 04:21 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You don't by chance have something in the 'Start In' field of your SSHELPER step? If so, clear that field.
Reply With Quote
  #13  
Old 01-05-2004, 04:41 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
No. There is nothing in the "Start in" field.
Reply With Quote
  #14  
Old 01-05-2004, 04:49 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Well, that is truly bizarre. In the 2nd case, the Run Program action encounters an error when launching SSHelper.exe, but the parameters that follow on the command-line would not have any bearing on whether the process itself could be started. There must be something different that isn't obvious. I would try tweaking the working sample step to point to your db/password/project and if you can get that to work, copy the working step into your project.
Reply With Quote
  #15  
Old 01-05-2004, 05:20 PM
ShaneJimmerson ShaneJimmerson is online now
Registered User
 
Join Date: 12-12-2003
Posts: 19
Well, it turns out that there was a space in the "Start in" field that was causing the problem. I didn't notice it until I looked at the XML for this step while I was copying the working step from the SourceSafe sample.

Thanks for your help.
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 04:20 PM.


Copyright © 1999-2023 Kinook Software, Inc.