Retrieve repository files for a given snapshot
I was trying to obtain repository files from a snapshot, which I obtained from the build result. The following code demonstrate what I tried to do:
IBuildResultContribution[] contributionsSnapShot = ClientFactory.getTeamBuildClient(teamRepository).getBuildResultContributions(buildResult, ScmConstants.EXTENDED_DATA_TYPE_ID_BUILD_SNAPSHOT, monitor); for (IBuildResultContribution snapShotContribution : contributionsSnapShot) { System.out.println(snapShotContribution.getExtendedContributionTypeId()); IItemHandle snapShotItemHanler = snapShotContribution.getExtendedContribution(); BaselineSet set = (BaselineSet) teamRepository.itemManager().fetchCompleteItem(snapShotItemHanler, 0, monitor); System.out.println(set.getName()); for(Object baseline : baselines) { System.out.println(baseline.toString()); } } The question is how do I get the correct version of repository files which are "marked" by the known snapshot? What APIs do I need to use? I couldn't find any more documentation for the RTC SDK plain Java APIs. Thanks a lot. |
Be the first one to answer this question!
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.