Exclude labes from versions (VSS API)
-
I'm working on a program that takes some files from one VSS database, does something with them and puts them into another VSS database. Everything was working until I triedy my program on a VSS project that had labels defined. My code searches for the latest version of a file. And if a file has some versions and a label which is the newest, I get the version number of that label. And I can't get a file based on the label. I need the latest version of a file even if the latest thing is a label. I would like to know if there is a way to exclude labels from the collection that get_Versions returns or how can I find out if the current version object (inside a foreach loop) is a label. My code looks something like that (relevant part that is): System.Collections.IEnumerator versions = vssFile.get_Versions ( 0 ).GetEnumerator (); versions.MoveNext (); int latestVersion = ((IVSSVersion)versions.Current).VersionNumber; latestVersionFile = vssFile.get_Version ( latestVersion ); string saveFileName = savePath + "\\" + latestVersionFile.Name; latestVersionFile.Get ( ref saveFileName, 0 );
-------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!