It's all about the answers!

Ask a question

add a comment to to a new changeset using Java API


K M (38324649) | asked May 06 '10, 10:24 a.m.
Created a new change set, how do I add a comment to it
so it shows up in file(s) history??

IChangeSetHandle cs1 = workspace.createChangeSet(component, MONITOR);
IChangeSet cs1_item = (IChangeSet) repo.itemManager().fetchCompleteItem(cs1, IItemManager.REFRESH, MONITOR);

IChangeHistorySyncReport sync = workspace.compareTo(stream, WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY,
Collections.EMPTY_LIST, MONITOR);

workspace.deliver(stream, sync, Collections.EMPTY_LIST,sync.outgoingChangeSets(component), MONITOR);

One answer



permanent link
Michael Valenta (3.7k3) | answered May 07 '10, 9:32 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
This is done using the workspace manager. here's the call:

SCMPlatform.getWorkspaceManager(repo).setComment(...

Michael

mcraek wrote:
Created a new change set, how do I add a comment to it
so it shows up in file(s) history??

IChangeSetHandle cs1 = workspace.createChangeSet(component, MONITOR);
IChangeSet cs1_item = (IChangeSet)
repo.itemManager().fetchCompleteItem(cs1, IItemManager.REFRESH,
MONITOR);

IChangeHistorySyncReport sync = workspace.compareTo(stream,
WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY,
Collections.EMPTY_LIST, MONITOR);

workspace.deliver(stream, sync,
Collections.EMPTY_LIST,sync.outgoingChangeSets(component), MONITOR);

Your answer


Register or to post your answer.