Set comment with API

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
fcoulombe
Posts: 6
Joined: Wed Oct 04, 2006 7:10 am

Set comment with API

Post by fcoulombe » Tue Oct 31, 2006 12:19 pm

Hi,

I'm looking for a way to programmatically add comment to the last checked in file in the vault repository. I know the Source Gear client can do this operation but I wat to do it in an automated program that will put the comment after the file will be check in not at the same time. I checked the API and the only thing I found was InternalChangeSet_SetItemComment is it the right function and if so how should I use it.

Thank You

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Oct 31, 2006 3:51 pm

I believe what you will want here is:

ClientInstance.Connection.UpdateTxComment(repID, transactionID, 0, comment);

You can get transactionID from VaultHistoryItem.TxID

fcoulombe
Posts: 6
Joined: Wed Oct 04, 2006 7:10 am

Post by fcoulombe » Tue Oct 31, 2006 4:09 pm

It seems you are right with UpdateTxComment but I can't find any information on VaultHistoryItem.TxID. How can I find the TransactionId if I have the version and the filename of the file that I want to change the comments in the history

Thanks

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Nov 01, 2006 11:57 am

You'll want to run a history query such as is mentioned here: http://support.sourcegear.com/viewtopic.php?t=450

Post Reply