NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read the Visual Source Safe version of a sequence file?

I can read the TestStand Version using RunState.SequenceFile.Data.Version. I would like to sink the version numbers in VSS and TestStand up. How do I obtain the version number maintained by VSS.
Thanks, Jeff
0 Kudos
Message 1 of 6
(3,926 Views)
Jeff -
By VSS version, I assume that you mean the History version. I think that it would be very difficult to have these versions be the same. For example, if you check out a file, update it, save it to disk, what would the version be, the version that you checked out? If you then check it in, the new version of the file in VSS will be at least one version higher than the one on disk. Also, cloned files might not have the same history and so the version would be different.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 6
(3,926 Views)
Scott,
We use the 'keyword" feature with VSS for our *.vi revision control as described in LTR Vol. 8, No. 4, "Controlling VI Development". I thought there might be an equivalent in TestStand.

Thanks, Jeff
0 Kudos
Message 3 of 6
(3,926 Views)
Jeff -
A sequence file is a text file. Currently our version number is restricted to a x.x.x.x format.

Note that the comment field is available. This field could be used, but the only restriction is that the data in the field when stored to file automatically wraps at 145 characters as shown below (note the Revision keyword was not updated properly). So you could use it for some data but not a lot of keywords unless you made sure the formating of the comment was appropriate across muliple lines.

%COMMENT Line0001 = "$Archive: /TestExec/Users/Scottri/test.seq $\n$Author: Scottri $ \n$Date: 5/13/02 12:47p $ \t\n$Modtime: 5/13/02 12:46p $ \t\n$Revis"
%COMMENT Line0002 = "ion: $"
Scott Richardson
https://testeract.com
0 Kudos
Message 6 of 6
(3,926 Views)
One way to get the VSS version number is through the command line using the History command. See VSS help for more info. I think it would be possible to create an EXE step in TestStand that would execute the VSS command line and pipe the output to a file, where it could be read with some custom code. Of course it would be nice if there was a built-in TS step to do this. Here is an example of the VSS history command usage and it's output.

---- Example -----

C:\DevStudio\Vss\win32>ss history $/tekcal-ni/projects/80e0x/80e0x.seq -#2
History of $/tekcal-ni/projects/80e0x/80E0X.seq ...

**********************
Label: "Beta1"
User: Marki Date: 4/29/02 Time: 8:45a
Labeled
Label comment: Release to Customer Service.

***************** Version
14 *****************
User: Marki Date: 4/26/02 Time: 3:00p
Checked in $/TekCal-NI/Projects/80E0X
Comment: Changed delay time for DC Accuracy/Linearity from 0 to 100 mS.

---- End of Example -----

If you just want the last version, use the "-#1" option instead of -#2 as in this example. VSS uses labels or whole number version numbers, so you would need to relate this to your TS version number, perhaps with a sequence file global variable.
0 Kudos
Message 4 of 6
(3,926 Views)
Another thought is to use the command line with the Diff command. This will tell you if your file matches the most recent version in VSS by doing an actual file compare. This gets around the problems that Scott mentioned.
0 Kudos
Message 5 of 6
(3,926 Views)