ProcessCommandCheckIn missing from latest API??
Moderator: SourceGear
-
- Posts: 2
- Joined: Wed Sep 23, 2009 9:57 am
ProcessCommandCheckIn missing from latest API??
I'm writing a simple utility to do check out/ check in/ undo check out from Vault. Each time the util is called, it will only be working with a single item, never a set of items. I have the check out and undo check working perfectly, but can't seem to make a check in work. I keep seeing references to using ServiceOperations.ProcessCommandCheckIn, but that seems to be unavailable in the version of the API I'm using (5.0.1.18729) and I can't seem to make ProcessCommandCommit work. It either runs with no error, but doesn't check the items in, or returns error zero with no description. Any help would be appreciated. Thanks in advance.
Re: ProcessCommandCheckIn missing from latest API??
ProcessCommandCheckIn is an alias for ProcessCommandCommit.
As for what's going on, it would be helpful for your app to subscribe to the UserMessage event using:
As for what's going on, it would be helpful for your app to subscribe to the UserMessage event using:
Code: Select all
ServerOperations.GetInstance().UserMessage
Subscribe to the Fortress/Vault blog
-
- Posts: 2
- Joined: Wed Sep 23, 2009 9:57 am
Re: ProcessCommandCheckIn missing from latest API??
Here is the code I'm using to attempt the check in. It's VB.Net, but I can post in C# if anyone would prefer. Also, I am checking the user message, but all I ever get is "Commit Failed" when it tries to run the ProcessCommandCommit line. I'm starting to get the feeling I have something else wrong, but I have All of my working folders are set, and Check Outs and Undos work fine. I've been working on this for so long now, I'm probably not seeing something that is right in my face.
sVaultFilePath = "$/Exuma/Server_Code/DB.BP/PAYTYPES"
ServerOperations.client.AutoCommit = True
ServerOperations.ProcessCommandListChangeSet(New String() {sVaultFilePath})
csic = New VaultClientOperationsLib.ChangeSetItemColl()
ServerOperations.client.Comment = sComment
ServerOperations.ProcessCommandCommit(New String() {sVaultFilePath}, UnchangedHandler.UndoCheckout, False, VaultClientOperationsLib.LocalCopyType.Replace, csic)
ServerOperations.client.Comment = ""
sVaultFilePath = "$/Exuma/Server_Code/DB.BP/PAYTYPES"
ServerOperations.client.AutoCommit = True
ServerOperations.ProcessCommandListChangeSet(New String() {sVaultFilePath})
csic = New VaultClientOperationsLib.ChangeSetItemColl()
ServerOperations.client.Comment = sComment
ServerOperations.ProcessCommandCommit(New String() {sVaultFilePath}, UnchangedHandler.UndoCheckout, False, VaultClientOperationsLib.LocalCopyType.Replace, csic)
ServerOperations.client.Comment = ""
Re: ProcessCommandCheckIn missing from latest API??
Hrm, if you change it from UndoCheckout to Checkout, does it work?
Subscribe to the Fortress/Vault blog