|
#1
|
|||
|
|||
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. What's the reason? |
#2
|
|||
|
|||
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.
|
#3
|
|||
|
|||
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! |
#4
|
|||
|
|||
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...
|
#5
|
|||
|
|||
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 |
#6
|
|||
|
|||
Quote:
Quote:
|
#7
|
|||
|
|||
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. |
#8
|
|||
|
|||
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 Code:
sVersion = GetVersionForBuild("clsMyClass.cls", "1.12.034") Is such approach possible? And will it be possible to retrieve VSSItemsCollection (of a given project) from your script language? |
#9
|
|||
|
|||
Thread Tools | |
Display Modes | Rate This Thread |
|
|