I'm trying to pull data revision by revision out of the Vault system. The GetOperations.ProcessCommandGetVersion method seems to be working well for what I need, except that it doesn't pull files that were added for a given version (in other words, when the request type = VaultRequestType.AddFile ). What do I need to do to get these files as well? I don't understand why that data wouldn't be pulled. I must be missing something.
Here's a code sample, in case it helps:
Code: Select all
var items = ServerOperations.ProcessCommandTxDetail(txId).items;
string[] output;
foreach (var item in items)
{
if (item.ItemPath1.StartsWith(repoPath, StringComparison.CurrentCultureIgnoreCase))
{
switch (item.RequestType)
{
case 3: // Try to get individual items of this type; not working!
GetOperations.ProcessCommandGetVersion(
item.ItemPath1,
Convert.ToInt32(item.HistoryItems.Last().Version),
new GetOptions() {
MakeWritable = MakeWritableType.MakeAllFilesWritable,
Merge = MergeType.OverwriteWorkingCopy,
OverrideEOL = VaultEOL.None,
PerformDeletions = PerformDeletionsType.RemoveWorkingCopy,
SetFileTime = SetFileTimeType.Current,
Recursive = true
}
);
break;
}
}
}
// This gets everything, except request type 3
GetOperations.ProcessCommandGetVersion(
item.ItemPath1,
Convert.ToInt32(item.HistoryItems.Last().Version),
new GetOptions() {
MakeWritable = MakeWritableType.MakeAllFilesWritable,
Merge = MergeType.OverwriteWorkingCopy,
OverrideEOL = VaultEOL.None,
PerformDeletions = PerformDeletionsType.RemoveWorkingCopy,
SetFileTime = SetFileTimeType.Current,
Recursive = true
}
);
Jack