Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get history of a file API

Hello,
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

0 votes



2 answers

Permanent link

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.

1 vote

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.

I found this public API to retrieve history of a versionable:
com.ibm.team.scm.client.IChangeHistory.getHistoryFor(IVersionableHandle versionableHandle, int limit, IProgressMonitor monitor)

You can get IChangeHistory using this public API:

IChangeHistory com.ibm.team.scm.client.IFlowNodeConnection.changeHistory(IComponentHandle component)

1 vote


Permanent link
Hi Yehiel,
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

0 votes

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.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,932
× 1,202
× 169
× 67

Question asked: Oct 20 '13, 11:30 a.m.

Question was seen: 7,628 times

Last updated: Oct 16 '18, 2:50 a.m.

Confirmation Cancel Confirm