Page 1 of 1
Comments
Posted: Mon Dec 10, 2007 8:41 am
by Cast
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.
Posted: Mon Dec 10, 2007 9:02 am
by jclausius
Try setting the client instance's comment before committing. I think that will attach that comment to the change set.
Posted: Mon Dec 10, 2007 10:38 am
by Cast
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();
Posted: Mon Dec 10, 2007 1:34 pm
by jclausius
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.
Posted: Wed Dec 12, 2007 8:41 am
by Cast
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);