It's all about the answers!

Ask a question

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

praveen patidar (8612644) | asked Nov 07 '12, 9:56 p.m.
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 =
        //List<?> csOutList = sync.outgoingChangeSets();
        List<IChangeSetHandle> outgoingChangeSets = sync.outgoingChangeSets();

Accepted answer

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

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


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.

Your answer

Register or to post your answer.