Checking in Selected Files
Posted: Wed Jul 29, 2009 8:59 am
I am using the api VaultClient 3.1.9
I am trying to figure out the correct way to check selected files in and out. I am able to check out the files I select although I am not so sure it is the best way to do it so your input on this would be appreciated also. However I can't figure out how to check them back in. I included a snippet below of how I am attempting to do it.
For Each Item As DataGridViewRow In Me.GridRepositoryFiles.SelectedRows
ReDim Preserve FileList(I)
FileList(FileList.Length - 1) = Me._VaultSession.GetRoot.FindFileRecursive(Item.Cells(0).Value) -- the cell value is the file id
Next
Me._VaultSession.Get(FileList, True, VaultClientOperationsLib.MakeWritableType.MakeAllFilesWritable, VaultClientOperationsLib.SetFileTimeType.Current, VaultClientOperationsLib.MergeType.AttemptAutomaticMerge, P) (it does not seem to make them writeable)
Me._VaultSession.CheckOut(FileList, 2, "Check Out") ----the check out works
(here I want to check them back in but the only way I see is to get all the items changed and then select from the collection what I want to commit. Is this how it is done? Also could you include the line of code that does the actuel check in?)
Dim ChangedItems As VaultClientOperationsLib.ChangeSetItemColl = _VaultSession.InternalChangeSet_GetItems(True)
?? line of code to do the actual check in
Thanks for your help
I am trying to figure out the correct way to check selected files in and out. I am able to check out the files I select although I am not so sure it is the best way to do it so your input on this would be appreciated also. However I can't figure out how to check them back in. I included a snippet below of how I am attempting to do it.
For Each Item As DataGridViewRow In Me.GridRepositoryFiles.SelectedRows
ReDim Preserve FileList(I)
FileList(FileList.Length - 1) = Me._VaultSession.GetRoot.FindFileRecursive(Item.Cells(0).Value) -- the cell value is the file id
Next
Me._VaultSession.Get(FileList, True, VaultClientOperationsLib.MakeWritableType.MakeAllFilesWritable, VaultClientOperationsLib.SetFileTimeType.Current, VaultClientOperationsLib.MergeType.AttemptAutomaticMerge, P) (it does not seem to make them writeable)
Me._VaultSession.CheckOut(FileList, 2, "Check Out") ----the check out works
(here I want to check them back in but the only way I see is to get all the items changed and then select from the collection what I want to commit. Is this how it is done? Also could you include the line of code that does the actuel check in?)
Dim ChangedItems As VaultClientOperationsLib.ChangeSetItemColl = _VaultSession.InternalChangeSet_GetItems(True)
?? line of code to do the actual check in
Thanks for your help