How to get history of a file API
I need to get the Work-item of the last change-set in a stream, on deliver operation.
I already have the change-set. How can I search for the last Change-set like I can do in the Eclipse (History view, or search for change-set action) ?
I'm using server side plugin API .
Thanks,
Yehiel
2 answers
Hi,
I saw this:
IScmService scmService = getService(IScmService.class);
scmService.getHistoryForVersionable(ServiceHistoryProvider, versionableHandle, 2, false, null, monitor);
The new problem is that I don't know how to get the ServiceHistoryProvider.
Does someone knows if this is the right way to get the history Change-sets of a file?
How can I get this service ?
Thanks.
Comments
I would suggest to look into the class/interface that is used in the call and do a Java Search on the SDK to find the class, or an implementor. You can also easily search the SDK in the Eclipse PDE for where that operation is used and look at what classes are used there and how to get one of those.
IChangeHistory com.ibm.team.scm.client.IFlowNodeConnection.changeHistory(IComponentHandle component)
1 vote
This post addresses how to get the work item associated with a changeset: https://jazz.net/forum/questions/92467/how-to-get-workitem-from-changeset-inside-the-plugin
Comments
Hi,
My goal is to get the last work-item for each changed file in the changeset.
I have the change-set and the changes contained in it, but how can I get for each change, the predecessor change (in the history) and it's related Work-item ?
Any idea ?
Hi Yehiel,
I'm not sure how to get a predecessor change. Perhaps someone else can answer that.