Using API, how to compare two baselines to get changesets
I need to get a list of changesets which are the changes between two baselines of a component. I see there is a BaselineComparison class, but have not found a way to use it. Some example code would be greatly appreciated. Thx!
|
3 answers
Thanks for the help John. I was able to get both ways to work with your help. Here is some example code for reference.
Assuming baseline1 and baseline2 are provided IBaseline instances Using IBaselineConnection (simpler):
Using IScmService.compareBaselines:
|
I would also like to be to start with a build as an input to the baseline comparison. I found the example of how to query for a build and get a IBuildResult object. Can I use this to get at the baseline that the build created?
I need to get a list of changesets which are the changes between two baselines of a component. I see there is a BaselineComparison class, but have not found a way to use it. Some example code would be greatly appreciated. Thx! |
I would also like to be to start with a build as an input to the baseline comparison. I found the example of how to query for a build and get a IBuildResult object. Can I use this to get at the baseline that the build created? I need to get a list of changesets which are the changes between two baselines of a component. I see there is a BaselineComparison class, but have not found a way to use it. Some example code would be greatly appreciated. Thx! BaselineComparison is in the repository model and despite its name, it does not have anything to do with Jazz Source Control baselines. On the client-side, you can use IBaselineConnection#compareTo() to compare 2 baselines. On the server, you can use IScmService#compareBaselines(). Both return a sync-report which describes which change sets are unique to a particular baseline. Builds are associated w/snapshots and snapshots contain multiple baselines ... so you would need to iterate throughout all common components and compare each component one at a time. Hope this helps, JohnC SCM Server |
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.