How to get ChangeSet(All files changes) from IWorkItem item by Program.
I want a list contains all the files that got change for a RTC. how can I achieve this?
You can see if this thread helps: (from the client side)
repository
is an ITeamRepository
mgr
is an IItemManager
(repository.itemManager()
)workItem
is the IWorkItem
for which we want changesetsitems
holds the set of associated changeset links for the workitem
Code:
IClientLibraryContext ctx = (IClientLibraryContext)repository;
IQueryService svc = (IQueryService)ctx.getServiceInterface(IQueryService.class);
AuditableLinkQueryModel alqr = AuditableLinkQueryModel.ROOT;
IItemQuery iq = IItemQuery.FACTORY.newInstance(alqr);
iq.filter(alqr.name()._eq("com.ibm.team.filesystem.workitems.change_set").
_and( alqr.targetRef().referencedItem().itemId()._eq(iq.newUUIDArg())));
IItemQueryPage itemQueryPage = svc.queryItems(
iq,
new Object[] { workItem.getItemId() },
IQueryService.ITEM_QUERY_MAX_PAGE_SIZE);
List<IChangeSet> items = mgr.fetchCompleteItems(itemQueryPage.getItemHandles(),
mgr.DEFAULT, null);
Set<String> changedFilesAndFolders = new TreeSet<String>();
for (IChangeSet cs: changeSets) {
...
}
You would still need to list files within each change set of items
.
you have some idea to list files in:
IConfiguration
from IChangeSet
?"Other sources: