Kinook Software Forum

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

Reply
 
Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
  #1  
Old 02-17-2006, 09:32 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
Question Problem with "Get Latest..." when using label

In VSS tree I have a node $/MnProject, and there are several VB files (forms, modules etc) in this project. I add step of "SourceSafe" type to my build. I click menu "Properties..." and choose the "Database" tab. There I set:

Operation: Get
Database: <path to ini>
Username: <myname>
Password: <mypwd>
Projects and/or files...: $/MnProject/*.*
Recurse checkbox: checked
Version to operate on...: <blank>
Path for local files: <working folder of $/MnProject>


If I press "Test" button, everything works fine and I see how files are copied from VSS to my local drive; the last log record says "Build successfully completed". Wonderful.

But if change the following parameter:

Version to operate on...: LMyLabel

then I get the following output:

Code:
    Version not found

    Process completed with exit code 100
    17.02.2006 17:16:17: Step 'Get Latest from VSS' failed
    17.02.2006 17:16:18: Build ended.
Strange, because I certainly have a label "MyLabel" on two files located under $/MnProject! For example, if I start MS VSS Explorer, right-click on the $/MnProject node in the project tree, select "Show history..." and check all four upper checkboxes - then I do see those two labeled files in the history list!

What's the reason?
Reply With Quote
  #2  
Old 02-17-2006, 09:38 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
SourceSafe file labels aren't good for much -- you have to specify each individual filename to get on a file label. Project labels are much more useful -- they can be used in conjunction with wildcards and recursive gets.
Reply With Quote
  #3  
Old 02-17-2006, 09:57 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
Well, we often have such situations when a "stable" build of our software product is associated not just with the latest version of the whole VSS project (recursively with all its contents) but with different versions of different files. For example, we have such a situation:

$/MnProject contains:

1. MainModule.bas, latest VSS version is 5.
2. frmMain.frm, latest VSS version is 22.
3. clsMyClass.cls, latest VSS version is 14.
4. MnProject.vbp, latest VSS version is 7.

We want to make build - but not from the latest versions. Instead, we need to take the following versions for the build:

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

Note that items 1 and 3 need to be taken from VSS with their previous versions (not latest!).

In such case I can't leave "Version to operate on..." blank - because it's said "blank for current". I also can't use version number in this filed - versions differ (see above). I also can't use dates. So the only way out is to use labels, isn't it? And if yes - then it would be nice to place "LMyLabel" in that field and see how everythings works!
Reply With Quote
  #4  
Old 02-17-2006, 10:27 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
And more...

OK, I set "Version to operate on..." to "D02/17/06". I do have VSS subfolders (projects, not files!) with this date under $/MnProject. But again I get "Version not found" and "exit code 100" in the output pane. I understand nothing...
Reply With Quote
  #5  
Old 02-17-2006, 11:44 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Regarding versioning of multiple releases, look into share/pin/branch/merge functionality [1]. Although SourceSafe's implementation is not the most robust, so you may want to evaluate alternative products if you have to manage many different parallel releases.

Regarding getting by date, VSS only looks at file dates, not projects/folders. You may want to specify a date range [2].

[1] http://msdn.microsoft.com/library/en...d_Projects.asp
[2] http://msdn.microsoft.com/library/en...ne_SwitchV.asp
Reply With Quote
  #6  
Old 02-20-2006, 12:10 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
Exclamation

Quote:
Originally posted by kinook
Regarding versioning of multiple releases, look into share/pin/branch/merge functionality [1]. Although SourceSafe's implementation is not the most robust, so you may want to evaluate alternative products if you have to manage many different parallel releases.
Thanx, but actually I do not need sharing files across projects. The only thing I need is that the -V switch should work as described in [2]. It's said there that "the -V option displays all files and projects identified by the version number specified on the command line". So it should work with files as well, not only with projects... or I'm wrong?

Quote:
Originally posted by kinook
Regarding getting by date, VSS only looks at file dates, not projects/folders. You may want to specify a date range [2].

[1] http://msdn.microsoft.com/library/en...d_Projects.asp
[2] http://msdn.microsoft.com/library/en...ne_SwitchV.asp [/B]
Thank You for the links. I still can't understand why it doesn't want to work when -V switch is used with L to specify a label!
Reply With Quote
  #7  
Old 02-20-2006, 02:14 AM
Alexey Alexey is online now
Registered User
 
Join Date: 02-17-2006
Location: Moscow, Russia
Posts: 14
That's the command line that fails (together with all other output):

20.02.2006 10:06:42: --------------------Starting Build: 'MyTest.bld'--------------------
20.02.2006 10:06:42: Building project step 'Get Latest from VSS'...
"C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ss.exe" Get $/MnProject/*.* -GL"D:\MyVSS Root WorkFolder" -GWS -GTM -GCK -R -NL -I-N -VLMyLabel -Yyumashin,****** -W-
Version not found

Process completed with exit code 100
20.02.2006 10:06:42: Step 'Get Latest from VSS' failed
20.02.2006 10:06:42: Build ended.


And I also attach the screenshot of the step's properties.

BTW, I also labelled a project (not file) inside $/MnProject. It also gives the same output, although in one of your previous messages you wrote that labeling should work with projects OK.
Attached Images
 
Reply With Quote
  #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
  #9  
Old 02-20-2006, 08:11 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
http://www.visualbuild.com/Manual?scripting.htm
http://groups.google.com/groups?hl=e...pt&sa=N&tab=wg
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 11:38 PM.


Copyright © 1999-2023 Kinook Software, Inc.