Does the Vault Client API have a way to get Local Version #
Moderator: SourceGear
Does the Vault Client API have a way to get Local Version #
I need to use the Vault API to get the Local Version number being displayed on Vault to get my interface working properly. I have seen old posts with people asking for such a feature, but I never saw if it was added, and have not found a way to access it in my own inquiries.
Has this been added? If not is there a work around?
Here is what I want: Given a VaultClientFile, return the Local Version Number shown on Vault.
Has this been added? If not is there a work around?
Here is what I want: Given a VaultClientFile, return the Local Version Number shown on Vault.
Re: Does the Vault Client API have a way to get Local Versio
Did you check out this post here?
viewtopic.php?f=32&t=13968&p=58791
I'm going to move this question over to the Development Tips part of the forum so it is with the other API questions. If you have not seen that section, that's the place to check (viewforum.php?f=39).
viewtopic.php?f=32&t=13968&p=58791
I'm going to move this question over to the Development Tips part of the forum so it is with the other API questions. If you have not seen that section, that's the place to check (viewforum.php?f=39).
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Does the Vault Client API have a way to get Local Versio
Thank you for the reply. I had not seen that post, however it does not seem to work.
When I tried recreating this line:
WorkingFolder wf = ClientInstace.TreeCache.GetBestWorkingFolder(f.Parent);
It turned out that .GetBestWorkingFolder now returns a string, and not a working folder object so that did not work.
When I tried recreating this line:
WorkingFolder wf = ClientInstace.TreeCache.GetBestWorkingFolder(f.Parent);
It turned out that .GetBestWorkingFolder now returns a string, and not a working folder object so that did not work.
Re: Does the Vault Client API have a way to get Local Versio
Where did you get the VaultClientFile object from? From the current repository? If so, :
VaultClientFile f;
long nObjectID = f.ID;
long nVersion = f.Version;
long nObjectVersionID = f.ObjVerID;
VaultClientFile f;
long nObjectID = f.ID;
long nVersion = f.Version;
long nObjectVersionID = f.ObjVerID;
Jeff Clausius
SourceGear
SourceGear
Re: Does the Vault Client API have a way to get Local Versio
I did get the VaultClientFile from the current repository, but the information you just gave me gives me the "Remote Version" number displayed in Vault. I want the "Local Version" number.
I have no issue getting the Remote Version Number or the Status, but that Local Version number is extremely important to my current project.
I have no issue getting the Remote Version Number or the Status, but that Local Version number is extremely important to my current project.
- Attachments
-
- The Local Version
- LocalVersion.PNG (29.25 KiB) Viewed 28840 times
Re: Does the Vault Client API have a way to get Local Versio
Sorry. Had the wrong version in mind. Try this :
VaultClientFile file = <some vault client file from the repository>;
WorkingFolder wf = ClientInstance.GetWorkingFolder(file);
long localVersion = wf.GetDisplayVersion(file);
VaultClientFile file = <some vault client file from the repository>;
WorkingFolder wf = ClientInstance.GetWorkingFolder(file);
long localVersion = wf.GetDisplayVersion(file);
Jeff Clausius
SourceGear
SourceGear
Re: Does the Vault Client API have a way to get Local Versio
That worked perfectly! Thank you so much.
Re: Does the Vault Client API have a way to get Local Versio
No problem. I'm glad I was able to get you what you needed.
Jeff Clausius
SourceGear
SourceGear