Comments

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

Moderator: SourceGear

Post Reply
Cast
Posts: 8
Joined: Thu Dec 06, 2007 12:56 pm

Comments

Post by Cast » Mon Dec 10, 2007 8:41 am

In the Vault 4.0.5 C# API, I am trying to insert a comment while checking in a file.

From what I can tell, there is no option to do so in ServerOperations.ProcessCommandCheckIn()

Is there a way to fulfill what I'm trying? Perhaps there is a workaround? Or is this currently unsupported?

Thank you.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Dec 10, 2007 9:02 am

Try setting the client instance's comment before committing. I think that will attach that comment to the change set.
Jeff Clausius
SourceGear

Cast
Posts: 8
Joined: Thu Dec 06, 2007 12:56 pm

Post by Cast » Mon Dec 10, 2007 10:38 am

Thank you for the help Jeff,
It works as expected, now. I replaced

Code: Select all

ServerOperations.ProcessCommandCheckIn(new string[] { svFilepath }, UnchangedHandler.Checkin, false, LocalCopyType.Leave);
with

Code: Select all

ServerOperations.ProcessCommandListChangeSet(new string[] { svFilepath });
ServerOperations.client.ClientInstance.InternalChangeSet_SetComment("Comment");
ServerOperations.client.ClientInstance.Commit();

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Dec 10, 2007 1:34 pm

I was thinking about the Server Operation's client instance, which is wrapped in the ClientConnection class.

Something like ServerOptions.client.Comment = string.Empty;

Sorry I was a bit vague on that.
Jeff Clausius
SourceGear

Cast
Posts: 8
Joined: Thu Dec 06, 2007 12:56 pm

Post by Cast » Wed Dec 12, 2007 8:41 am

Ah, I was going off of your original response... which must have been replaced with what is now there about the comment.

Thank you for the follow up.

Code: Select all

ServerOperations.client.Comment = "Restored from previously deployed version " + svVersion + ".";
ServerOperations.ProcessCommandCheckIn(new string[] { svFilepath }, UnchangedHandler.Checkin, false, LocalCopyType.Leave);
:)

Post Reply