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(); |
Accepted answer
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<IChangeSet> changesets = itemManager.fetchCompleteItems(outgoingChangeSets, IItemManager.DEFAULT, null); praveen patidar selected this answer as the correct answer
Comments Hello
|
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.