It's all about the answers!

Ask a question

API to retrieve changeset list by comparing latest build snapshot and stream?


Kelvin Lui (51299) | asked Dec 28 '12, 2:57 p.m.
edited Jan 11 '13, 11:46 a.m. by Ralph Schoon (63.1k33645)
 The goal is to develop an advisory extension plugin to s to check as if a changeset is validated by a successful 85 Open Release Build, prior to the changeset delivery to the Stream.

The logic is as following:

1.  Fetch the latest Green 85 Open Release Build - Liberty
2.  Fetch the snapshot associated with that Green 85 Open Release Build - Liberty
3.  Compare the snapshot with 85 Managed Build - Liberty stream, which returns the delta list of changeset 
4. With the delta list of changeset, compare the list of changeset to be delivered to the stream.

By looking up the forum postings and experiments the APIs I have figured out 1 and 2.   The bottleneck is to figure out the api to be used to develop step 3.
3.  Compare the snapshot with 85 Managed Build - Liberty stream, which returns the delta list of changeset 

For step 3 here is the mini-step I have tried:

1.  By fetching the snapshot handle associated with the latest successful build (https://jazz.net/forum/questions/36699/retrieve-the-snapshot-name-of-the-last-successful-build),  
2.  By fetching the workspaceConnection associated with the stream:
3.  Fetching IChangeHistorySyncReport by passing in the snapshot handle in following API. report = workspaceConnection.compareToBaseline(baselineHandle, null);
4.  Fetching the outgoing changeset ->  List<IItemHandle> outgoingChangeSets = report
.outgoingChangeSets();

This is the line that doesn't return the expect output, as compared to running "Compare with repository workspace or stream" under Snapshot -> Links section.

Could someone please advise if I am on the right track or not?  

Thanks.

Kelvin

One answer



permanent link
Tim Mok (6.6k38) | answered Jan 11 '13, 2:37 p.m.
JAZZ DEVELOPER
I think you want the list of incoming change sets instead of outgoing. The report is from the context of the workspace connection, which is your stream. So the change sets "outgoing" from the stream to the snapshot wouldn't be the list you're looking for. Since your change doesn't exist in the stream, it won't show up as outgoing in the report.

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.