Reputation: 41
How can I modify an existing change set comment using the API? Using Visual Studio this can be done in the 'Changeset Details' window by changing the comment and clicking Save. How can it be done using the API?
Upvotes: 1
Views: 571
Reputation: 5010
You need to run the following code:
TeamFoundationServer tfs = new TeamFoundationServer(new Uri("http://tfsservername:8080/tfs/DefaultCollection"));
VersionControlServer vcServer = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
Changeset changeset = vcServer.GetChangeset(changesetid);
changeset.Comment = changeset.Comment + Environment.NewLine + "your comment";
changeset.Update();
Upvotes: 1