Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Suggestions (https://www.kinook.com/Forum/forumdisplay.php?f=4)
-   -   Cloak and Decloak SourceSafe Commands (https://www.kinook.com/Forum/showthread.php?t=272)

ShaneJimmerson 12-16-2003 03:57 PM

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.

kinook 12-16-2003 04:52 PM

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.

ShaneJimmerson 12-16-2003 06:26 PM

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.

kinook 12-19-2003 08:42 AM

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

ShaneJimmerson 12-19-2003 12:39 PM

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.

kinook 12-19-2003 02:21 PM

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.


%SSHELPER% "%SAMPLEDB%" Cloak $/Executables -y%SSUSER%,
1
Cloak
1
0:1


%SSHELPER% "%SAMPLEDB%" Decloak $/Executables -y%SSUSER%,
1
Decloak
1
0:1

ShaneJimmerson 01-05-2004 01:26 PM

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.

kinook 01-05-2004 01:50 PM

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

ShaneJimmerson 01-05-2004 02:25 PM

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.

kinook 01-05-2004 02:34 PM

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

ShaneJimmerson 01-05-2004 02:58 PM

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\VSt udio\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,'
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.

kinook 01-05-2004 03:21 PM

You don't by chance have something in the 'Start In' field of your SSHELPER step? If so, clear that field.

ShaneJimmerson 01-05-2004 03:41 PM

No. There is nothing in the "Start in" field.

kinook 01-05-2004 03:49 PM

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.

ShaneJimmerson 01-05-2004 04:20 PM

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.


All times are GMT -5. The time now is 12:50 AM.


Copyright © 1999-2023 Kinook Software, Inc.