Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to find the origin stream of a snapshot?

I have a given snapshot and want to find on which origin stream it is based.

In eclipse and via SCM CLI I can find all snapshots of a stream. Is there something similar to this?
Or do I have to loop through all streams and seek for my given snapshot?


Kind regard,
Zoran

0 votes

Comments

 Note that a snapshot does not have an "origin stream" (I assume by that, you mean the stream or workspace that it was created from) ... it has an "owner".   Since the owner property of a snapshot can be changed, the owning stream/workspace may be completely unrelated to the content of the snapshot.



One answer

Permanent link

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);
2)  Get the workspace/stream handle: IWorkspaceHandle wsHandle = baselineSet.getOwner();
3) Get the workspace/stream from the handle: IWorkspace workspace = ITeamRepository#itemManager()#fetchCompleteItem(wsHandle, ...);

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 1,202
× 79
× 74
× 4
× 2

Question asked: Oct 16 '17, 8:41 a.m.

Question was seen: 5,560 times

Last updated: Oct 19 '17, 2:53 a.m.

Confirmation Cancel Confirm