ProcessCommandCheckIn missing from latest API??

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

Moderator: SourceGear

Post Reply
jayhutch6279
Posts: 2
Joined: Wed Sep 23, 2009 9:57 am

ProcessCommandCheckIn missing from latest API??

Post by jayhutch6279 » Wed Sep 23, 2009 10:10 am

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.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: ProcessCommandCheckIn missing from latest API??

Post by jeremy_sg » Wed Sep 23, 2009 11:53 am

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:

Code: Select all

ServerOperations.GetInstance().UserMessage
Subscribe to the Fortress/Vault blog

jayhutch6279
Posts: 2
Joined: Wed Sep 23, 2009 9:57 am

Re: ProcessCommandCheckIn missing from latest API??

Post by jayhutch6279 » Wed Sep 23, 2009 2:02 pm

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 = ""

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: ProcessCommandCheckIn missing from latest API??

Post by jeremy_sg » Wed Sep 23, 2009 2:12 pm

Hrm, if you change it from UndoCheckout to Checkout, does it work?
Subscribe to the Fortress/Vault blog

Post Reply