How to find the origin stream of a snapshot?
One answer
In scm cli you could call 'scm show attributes --snapshot <name/alias/uuid>' to show the owner of the snapshot.
To get this info using the api:
1) Get the snapshot: IBaselineSet baselineSet = IWorkspaceManager#findBaselineSets(IBaselineSetSearchCriteria criteria, int maxResults, IProgressMonitor monitor);
1) Get the snapshot: IBaselineSet baselineSet = IWorkspaceManager#findBaselineSets(IBaselineSetSearchCriteria criteria, int maxResults, IProgressMonitor monitor);
2) Get the workspace/stream handle: IWorkspaceHandle wsHandle = baselineSet.getOwner();
3) Get the workspace/stream from the handle: IWorkspace workspace = ITeamRepository#itemManager()#fetchCompleteItem(wsHandle, ...);
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 19 '17, 2:53 a.m.