It's all about the answers!

Ask a question

RTC SCM Client : Addition/deletion of Components not shown properly in the Snapshots Comparisions.


Jazzuser user (68749) | asked Nov 27 '17, 2:53 a.m.
edited Nov 28 '17, 9:52 a.m. by David Lafreniere (4.8k7)

Hello All,
I tried a usecase wherein I added a component to a stream and delivered few Changesets, created Snapshot.
then Right Click on Stream --> Show Snapshots --> Select this created snapshot with latter one --> Compare with --> each Other.

Here for the addition of component, I should get a "+" symbol, instead getting " - " symbol. Is this an issue ? am not sure about this.

Also I am trying to do the same in my code as well, using SCM APIs,posted a question for the same : https://jazz.net/forum/questions/247224/scm-api-how-to-compare-2-snapshots-with-changes-in-the-components-included-in-each-snapshot

I am not getting the changesets part of newly added component, as the changeset diff.

Please advice.

One answer



permanent link
David Lafreniere (4.8k7) | answered Nov 28 '17, 10:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

When you compare two snapshots (or two workspaces/streams), the Change Explorer is shown [in Eclipse and VS], and if a component exists in one and not the other, we report this is a 'component addition' or 'component removal'. The '+' decorator means an component addition, and the '-' means a component removal. Prior to RTC 6.0.5 these decorators might get a little confusing/ambiguous because an 'outgoing component addition' is the same as an 'incoming component removal' and an 'outgoing component removal' is the same as an 'incoming component addition'.
This 'decorator' situation has been made more clear in RTC 6.0.5 in the following work items:
The component addition/deletion ("+" / "-") decorator signs in the Change Explorer view are reversed (432188)
Component 'Additions' and 'Removals' are not consistent/confusing in the Change Explorer and Change Summary Log (430943)

Note: We still only show the 'component' node without the ability to expand it to show change sets. Such a node implies that the entire 'history' of the component is missing from the snapshot that does 'not' have the component. I.e. if a component had a history of 1 million change sets, we would not want the ability to expand that component to show the full history (1 million change sets) in the Change Explorer view (due to performance/scalability reasons). If the user does want to see the history of that component though (i.e. all the change sets), they are expected to use the History view (i.e. right-click on the component in the snapshot that has the component, and select 'Show' --> 'History').


Comments
Jazzuser user commented Nov 29 '17, 12:58 a.m.

Thanks a lot for your reply David. I got a insight on this.
we need to do the same programmatically, to get the changesets part of two snapshots diff. we are using compareBaselineSets().
 IChangeHistorySyncReport changeSync = workspaceManager.compareBaselineSets(snapshot, snapshotParent,
                    null, null);
This API gives only the details of the delta changesets of the components part of both the snapshots.
If the component is part of only one snapshot, then those changesets are not fetched.

Is there any other alternate API to do the same ?

Request you to assist on this as well.


David Lafreniere commented Nov 29 '17, 9:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

For the component (or baseline in this case, since you are dealing with a snapshot) that exists in one snapshot and not the other,
get the IBaselineConnection using:
IWorkspaceManager#getBaselineConnection(IBaselineHandle baselineHandle ,IProgressMonitor monitor)
The IChangeHistory can give you a reference point to get the change set history. You can get this using IBaselineConnection#changeHistory()

Your answer


Register or to post your answer.