I have a local file at version 3, and the repository version is 4 having been rolled back to 2. Viewing the folder with the Vault GUI client shows that file with Local Version 3 and Remote Version 4, and getting the File Properties also shows Version 3 for the "Local copy" and Version 4 for the "Latest in Repository". How do I find out the local version of the file is 3? FindVaultTreeObjectAtReposOrLocalPath or FindVaultFileAtReposOrLocalPath with the local filename both return the repository version of the file.
Thanks,
Eric
Get local version value
Moderator: SourceGear
Re: Get local version value
You could try to check the version of the VaultClientFile from ClientInstance.TreeCache.Repository.Root.FindFileRecursive($/A/B/.../file).
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Get local version value
It didn't work - returns the same item as RepositoryUtil.FindVaultFileAtReposOrLocalPath(path), and has the repository version of the file, not the local version. Can you find out how the Vault client determines the local version?
Re: Get local version value
What happens if you try something like the following?
Using the VaultClientFile's parent folder to get a working folder:
VaultClientFile f = ... <some file> ...; if ((f != null) && (f.Parent != null)) {
WorkingFolder wf = ClientInstace.TreeCache.GetBestWorkingFolder(f.Parent);
if (wf != null)
long nLocalVersion = wf.GetBaselineVersion(f); }
Using the VaultClientFile's parent folder to get a working folder:
VaultClientFile f = ... <some file> ...; if ((f != null) && (f.Parent != null)) {
WorkingFolder wf = ClientInstace.TreeCache.GetBestWorkingFolder(f.Parent);
if (wf != null)
long nLocalVersion = wf.GetBaselineVersion(f); }
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support