VersionHistoryBegin method of the VaultConnection class
Moderator: SourceGear
VersionHistoryBegin method of the VaultConnection class
Is there any documentation on the method and class stated above?
I'm having problem figuring out how to make use of this function. I can't retrieve the version information of the root folder that i need.
public void VersionHistoryBegin(int nRowLimit, int nRepID, long nObjID, DateTime dtBeginRange, DateTime dtEndRange, long nStartVersion, ref int nRowsRetrieved, ref string strQryToken);
What is the nObjID parameter?
I'm using the Vault 3.19 API.
I'm having problem figuring out how to make use of this function. I can't retrieve the version information of the root folder that i need.
public void VersionHistoryBegin(int nRowLimit, int nRepID, long nObjID, DateTime dtBeginRange, DateTime dtEndRange, long nStartVersion, ref int nRowsRetrieved, ref string strQryToken);
What is the nObjID parameter?
I'm using the Vault 3.19 API.
First you call BeginXXXQuery to start the history query on the server. The Object ID is the ID property of the item found within the tree cache.
After a successful call, you pick up the results with the Fetch method.
Since the results are cached on the server, you close the query with EndXXXQuery.
After a successful call, you pick up the results with the Fetch method.
Since the results are cached on the server, you close the query with EndXXXQuery.
Jeff Clausius
SourceGear
SourceGear
Could anyone help me figure out how to call this method in VaultClientAPI_4_0_5_15922 ??
This is the signature:
public void VersionHistoryBegin(int nRowLimit, int nRepID, long nStartVersion, VaultHistoryQueryRequest hqr, ref int nRowsRetrieved, ref string strQryToken);
...and this is how I have tried to call it:
file is a VaultClientFile;
int retrieved = 0;
String token = String.Empty;
VaultHistoryQueryRequest request = new VaultHistoryQueryRequest();
request.IsFolder = false;
request.Recursive = true;
request.RepID = ActiveRepositoryID;
request.SubstringType = VaultQueryRequestSubstrings.DoNotFilter;
request.DateFilterType = VaultQueryRequestDateTypes.DoNotFilter;
request.CommentFilter = VaultQueryRequestComments.DoNotFilter;
request.TopName = file.FullPath;
moClient.Connection.VersionHistoryBegin(1, ActiveRepositoryID, file.Version, request, ref retrieved, ref token);
moClient.Connection.VersionHistoryEnd(token);
problem is, retrieved is always 0.
This is the signature:
public void VersionHistoryBegin(int nRowLimit, int nRepID, long nStartVersion, VaultHistoryQueryRequest hqr, ref int nRowsRetrieved, ref string strQryToken);
...and this is how I have tried to call it:
file is a VaultClientFile;
int retrieved = 0;
String token = String.Empty;
VaultHistoryQueryRequest request = new VaultHistoryQueryRequest();
request.IsFolder = false;
request.Recursive = true;
request.RepID = ActiveRepositoryID;
request.SubstringType = VaultQueryRequestSubstrings.DoNotFilter;
request.DateFilterType = VaultQueryRequestDateTypes.DoNotFilter;
request.CommentFilter = VaultQueryRequestComments.DoNotFilter;
request.TopName = file.FullPath;
moClient.Connection.VersionHistoryBegin(1, ActiveRepositoryID, file.Version, request, ref retrieved, ref token);
moClient.Connection.VersionHistoryEnd(token);
problem is, retrieved is always 0.
If you're using 4.0, then you should be using the VaultClientIntegrationLib call for VersionHistory, which just takes simple strings and ints. For information on how to get started with IntegrationLib, see: http://support.sourcegear.com/viewforum.php?f=31
Thanks. I looked at the help and it looks like it specifically retrieves versions for a folder path. I am not sure what that means. By folder path, could that be "$/MyProject" ??
Mainly, what I am looking for is, how I can retrieve version 10 of a specific file inside a project. If my assumption above is correct, I dont think that would be the way to go. I have tried passing it the actual item path "$/MyProject/HelloWorld.cs" and it retrieves none.
I am not at all interested in the different version of a folder. I only care about the different history versions of items (files). Currently, I am retrieving the entire version list and then going through the list one by one to find the version I want. Is there an easier way to do this using VersionHistoryBegin ?
Mainly, what I am looking for is, how I can retrieve version 10 of a specific file inside a project. If my assumption above is correct, I dont think that would be the way to go. I have tried passing it the actual item path "$/MyProject/HelloWorld.cs" and it retrieves none.
I am not at all interested in the different version of a folder. I only care about the different history versions of items (files). Currently, I am retrieving the entire version list and then going through the list one by one to find the version I want. Is there an easier way to do this using VersionHistoryBegin ?