It's all about the answers!

Ask a question

[Baseline sets comparison] Incomplete remoteComponents list returned by the ChangeHistorySyncReport


Marco Lecora (136) | asked Aug 02 '19, 5:37 a.m.
edited Aug 02 '19, 9:00 a.m.
Hi everyone!

I'm facing an issue (for the first time) related to the comparison of two snapshots of the same stream. 

The list of remoteComponents returned by the compare report object does not contain all the components; thus, I'm not able to detect the actual changes in the snapshot.

IChangeHistorySyncReport report = report = this.workspaceManager.compareBaselineSets(oldSnapshotBaselineSetHandle, newSnapshotBaselineSetHandle, Collections.EMPTY_LIST, MONITOR);
List<IComponentHandle> components = report.remoteComponents();
List<IComponentHandle> localComponents = report.localComponents();

Is there something else to be set before invoking the comparison?

Thank you in advance for the support.
Regards

Marco

One answer



permanent link
David Lafreniere (4.8k7) | answered Aug 02 '19, 9:42 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Do the snapshots actually have a different set of components (i.e. was a component added/removed, and then the second snapshot taken?)

Or does the user (contributor) running the operation not have read-access to some of the components by any chance? Check the component owner/visibility for the ones that you think are missing. Using the Eclipse client, log-in as the user running the operations, and see if they can see and open the missing components.

Comments
Geoffrey Clemm commented Aug 04 '19, 10:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just for interest's sake, what is a "local component" and what is a "remote component"? 


Marco Lecora commented Aug 05 '19, 3:16 a.m. | edited Aug 06 '19, 12:16 p.m.

Hi David,


Thank you for your answer. The Eclipse client correctly displays the list of all the updated components. 
Is there any debug method/log that could be used to see why the API is "filtering" the components?

Regards
Marco

@Geoffrey: As per the Java doc of the API:
localComponents
Returns the components known to the local workspace or change history. 
If this report was generated in a workspace context, then the components returned represent those known to the workspace that initiated the report, omitting any components were explicitly excluded. If the report was generated in a change history context, then there will be a single component returned, that referenced by the change history that initiated the report. Note that in the change history context, the single component returned by this method and remoteComponents() will be the same. 
If you need to know what components were added/removed from the local and remote workspaces, you will need to compare the value of this method with that of remoteComponents(). 

remoteComponents
Returns the components known to the remote workspace or change history. 
If this report was generated in a workspace context, then the components returned represent those known to the workspace that was the target of this report, omitting any components were explicitly excluded. If the report was generated in a change history context, then there will be a single component returned, that referenced by the change history that is the target of this report. Note that in the change history context, the single component returned by this method and localComponents() will be the same. 

If you need to know what components were added/removed from the local and remote workspaces, you will need to compare the value of this method with that of localComponents(). 




David Lafreniere commented Aug 06 '19, 12:26 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Can you describe the results in more detail?. I'm assuming 'localComponents' and 'remoteComponents' are in fact returning 'some' components; but for a component that is missing, is it missing from only 'localComponents', or from 'remoteComponents', or both?
Also, (I forget the inner workings of this method...) is there a small chance it's not returning components in both locatel/remote if there are no changes at all? Ccan you compare the two baselines (from the component that is missing) in the Eclipse UI to see if there are change set differences or not (and repeat with the baselines that do show up in the compare result).

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.