It's all about the answers!

Ask a question

Getting files from local repository workspace


Giacomo Ghezzi (161) | asked Apr 18 '08, 11:24 a.m.
Hi,
I'm trying to integrate into Jazz a tool we developed in our research group.
More precisely, every time a change set is delivered from a local workspace repository to the team repository, that tool would have to perform, right before the actual delivery, some analyses on every source file associated to that change set.
I already know the class that does the delivery: com.ibm.team.filesystem.ui.changes.actions.DeliverAction.
and from there, I'm already able to gather much information, but I can't find a way to get the actual source file.
I added in the "deliver" method of the DeliverAction class a piece of code that for every outgoing change set get the related outgoing change summary.
With that code I can access a lot of info on the change sets and also on the items (and thus also the files) associated, as I'm able to get the specific ItemHandles.
Thanks to the helpful fellas on the forum, I know how the JazzSCM works and how to get specific files, change sets etc. from the team repository, but for the local repository it looks like a different story.

Here is a snippet of the code I added to the "deliver" method of DeliverAction to try to solve the problem:



for(Iterator<OutgoingChangeSetNode> selIter = selection.iterator(); selIter.hasNext();){
OutgoingChangeSetNode tmp = selIter.next();
List <OutgoingChangeSummaryNode> summaryList = (tmp.getChanges();
for(Iterator<OutgoingChangeSummaryNode> summaryIter = summaryList.iterator(); summaryIter.hasNext();){
OutgoingChangeSummaryNode tmpSummary = summaryIter.next();
System.out.println(tmpSummary.getResourceName().toString());
if(tmpSummary.getItem() instanceof IFileItemHandle){
System.out.println(((OutgoingChangeSetNode)tmp).getActivitySource().getWorkspace().getDescription());
...
}


How can I, from there, get the actual files that are in the local repository, before they get deliver to the team repository?

P.S.
The code I wrote works for only for the delivery of singles change sets as when working with the delivery of multiple changes sets I have to deal with OutgoingWorkspaceNodes. but I'll take care of that later.

Comments
Saravanakumar Sakthivel commented Mar 01 '13, 6:07 a.m.

Hi, I am also trying to get the actual files as IResources from ChangeSet. Please let me know any one have solution to this.

One answer



permanent link
Saravanakumar Sakthivel (1123) | answered Mar 01 '13, 6:07 a.m.
Hi, I am also trying to get the actual files as IResources from ChangeSet. Please let me know any one have solution to this.

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.