It's all about the answers!

Ask a question

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


praveen patidar (8623544) | asked Nov 07 '12, 9:56 p.m.
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();
       

Accepted answer


permanent link
Andrew Niefer (7135) | answered Nov 08 '12, 9:49 a.m.
JAZZ DEVELOPER
edited Nov 08 '12, 9:52 a.m.
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

Comments
praveen patidar commented Nov 08 '12, 10:05 p.m. | edited Nov 08 '12, 10:06 p.m.

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 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.