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();
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);
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