Retrieve change set based on given IBuildResult object
![](http://jazz.net/_images/myphoto/1035bd290284e23c5fe77c7abed691cb.jpg)
How do I retrieve the change set (diff from previous build result) from a given build result object? From the RTC web page, There is a link "Show Change":
![](https://lh4.googleusercontent.com/-hKkz146zgpY/VRpEUj5hcEI/AAAAAAAATf4/8J3OpY-olKA/w850-h588-no/1.png)
when click on it, I can have the corresponding change set diffed from the previous build result:
![](https://lh6.googleusercontent.com/-YdFF3_qmouI/VRpEoLURt_I/AAAAAAAATgM/pMQru1JwTKQ/w1039-h586-no/2.png)
That way, I can analyze the change set to narrow down the problem space while the test cases broken.
Many thanks!
Accepted answer
One other answer
![](http://jazz.net/_images/myphoto/1035bd290284e23c5fe77c7abed691cb.jpg)
I assume you have to get the snapshot from the build result and / or some other data. The additional data is stored in a build result using IBuildResultContribution(s). To access them see the code below as an example.
ITeamBuildClient buildClient = (ITeamBuildClient) fTeamRepository.getClientLibrary(ITeamBuildClient.class);
IBuildResultContribution[] logs = buildClient.getBuildResultContributions(buildResult,
new String[]{IBuildResultContribution.LOG_EXTENDED_CONTRIBUTION_ID}, null);
ITeamBuildClient buildClient = (ITeamBuildClient) fTeamRepository.getClientLibrary(ITeamBuildClient.class);
IBuildResultContribution[] logs = buildClient.getBuildResultContributions(buildResult,
new String[]{IBuildResultContribution.LOG_EXTENDED_CONTRIBUTION_ID}, null);