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

Change Set -how to retrive the information of changeset programatically ?

Hello
I have a requirement to get the status of the remote work space, I have done the client API programming for this and got the ChangeSetHandle list for the outgoing changes.
How to get ChangeSet object from the ChangeSetHandle to get more info on each changeSet.
The code below will give all the outgoing changeset handler list.

IChangeHistorySyncReport sync =
            wkspConnection.compareTo(
                    streamConnection,
                    WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY,
                    Collections.EMPTY_LIST,
                    null);
       
        //List<?> csOutList = sync.outgoingChangeSets();
        List<IChangeSetHandle> outgoingChangeSets = sync.outgoingChangeSets();
       

0 votes


Accepted answer

Permanent link
You can use the IItemManager to fetch the change sets.


ITeamRepository teamRepository = wrkspConnection.teamRepository();
IItemManager itemManager = teamRepository.itemManager();

//fetch a single changeset
IChangeSet changeset = (IChangeSet) itemManager.fetchCompleteItem(changeSetHandle, IItemManager.DEFAULT, null);

//fetch a whole list at once, resulting list may contain nulls
List&lt;IChangeSet&gt; changesets = itemManager.fetchCompleteItems(outgoingChangeSets, IItemManager.DEFAULT, null);




praveen patidar selected this answer as the correct answer

1 vote

Comments

Hello

I have got the file names from the changeset, but not able to get the File Full path. Can you please tell me the exact way to do this. see my post for how I implemented this with the code.

https://jazz.net/forum/questions/93557/how-get-full-path-of-the-file-from-changeset-using-api

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

Question asked: Nov 07 '12, 9:56 p.m.

Question was seen: 3,810 times

Last updated: Nov 08 '12, 10:06 p.m.

Confirmation Cancel Confirm