View Single Post
  #8  
Old 02-20-2006, 07:35 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
OK, it seems that it's a question not to You but to Microsoft. VSS is really a strange thing.

As far as I can't perform the built-in "Get latest" step in the desired manner, I'm thinking of writing some kind of script that will recursively search through the VSS project tree, getting individual versions of each file one-by-one. As in my example above:

Build 1.12.034 is:
1. MainModule.bas - 4.
2. frmMain.frm - 22.
3. clsMyClass.cls - 10.
4. MnProject.vbp - 7.

Of course, I should store somewhere such table describing the structure of the build, but it's another question. Probably this will MS SQL Server 2000.

So my question is: has your built-in script language enough capabilities to perform this task? I'll need smth. like this:
Code:
For i = 1 To VSSItemsCollection.Count
    sVersion = GetVersionForBuild(VSSItemsCollection(i).FileName, "1.12.034")
    VSSItemsCollection(i).GetVersionFromVSS sVersion, sLocalFolder
Next i
Here GetVersionForBuild is my custom function obtaining (e.g. from SQL Server) version number of a given file for a given build. For example, the following call
Code:
    sVersion = GetVersionForBuild("clsMyClass.cls", "1.12.034")
should return "10" (see the "blue" example above). And GetVersionFromVSS is another custom function calling ss.exe with switch Get etc.

Is such approach possible? And will it be possible to retrieve VSSItemsCollection (of a given project) from your script language?
Reply With Quote