ProcessCommandGetVersionToLocationOutsideWorkingFolder issue

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

ProcessCommandGetVersionToLocationOutsideWorkingFolder issue

Post by avonwyss » Tue Sep 14, 2010 11:24 am

I'm trying to get the files in a folder as they were at a specific time, just like the "View Tree" / "Get Tree" operations in the Vault client.

I'm currently trying this:

Code: Select all

VaultTxHistoryItem[] txHistoryItems = ServerOperations.ProcessCommandVersionHistory(...)
This gives me the list of folder versions - so far so good. Then I'm trying to get the files using this (using one of the array items):

Code: Select all

GetOperations.ProcessCommandGetVersionToLocationOutsideWorkingFolder(repoPath, (int)txHistoryItem.Version, options, destPath);
That seems to work fine for the first versions. However, after a bunch of versions it seems to get me folder versions which are in the future (and definitively not the ones shown by the client "View Tree"); in my case some 40 versions or so off after about 2000 folder versions. I was unable to determine exactly where the shift comes from, but that typecast to (int) for the version looks odd to me. However, I didn't see any other version which I could supply either.

So, what's the way to do it?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: ProcessCommandGetVersionToLocationOutsideWorkingFolder issue

Post by lbauer » Tue Sep 14, 2010 1:01 pm

So if the latest folder version is 100, the API is giving you folder version 105, for example?
Strange.

What version of Vault are you using?
Linda Bauer
SourceGear
Technical Support Manager

avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

Re: ProcessCommandGetVersionToLocationOutsideWorkingFolder issue

Post by avonwyss » Tue Sep 14, 2010 1:04 pm

I'm not sure about the exact version, but I did get unexpected files in there.

Basically I would like to know if I'm using the correct version or if I should use another one? Since my code is somewhat complex I might need some time to isolate the problem more.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: ProcessCommandGetVersionToLocationOutsideWorkingFolder issue

Post by lbauer » Wed Sep 15, 2010 12:42 pm

I consulted with a developer. Check to see if ProcessCommandGetVersionToLocationOutsideWorkingFolder() is called with a destPath of null.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply