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

Set Owner of Snapshot (baselineset) using Java APIs

 Hi,

I'm trying to change the owner of a baselineset from a repository workspace to a stream programatically.  It looks like you can set the name or comment of a snapshot pretty easily using:

IScmService#setBaseLineSetComment()

But there is not option to set the owner.  The only thing I have found that looks remotely correct is:

IWorkspaceConnection#addBaseLineSet()

But this does not work and I'm not quite sure what this API does.

Any help is much appreciated!

Thanks

1 vote


Accepted answer

Permanent link
IWorkspaceConnection#addBaseLineSet() is the right api to associate the snapshot to the workspace/stream. Once you do that listing the snapshots associated with the workspace/stream will list it.
Scott Pecnik selected this answer as the correct answer

3 votes

Comments

 Hi Shashikant,


Thanks for the reply.  When I do a listing on the stream that I used to call #addBaseLineSet() I do see the snapshot.  However, in the client when I right-click on the stream and select "show-> snapshots" I do not see the snapshot.  What is the difference between associating a snapshot and changing the owner of a snapshot?

It is the same. When you associate it to a stream the stream becomes the owner of the snapshot.

I would have expected 'show snapshots' on the stream to show your recently added snapshot. I am wondering if the client is returning the cached data. How about you try Search->Jazz Source Control->Snapshots?

Sorry for the slow response and thanks for the clarification!  Turns out there were some other issues in my code that caused the api to behave unexpectedly.  I'm all set now.

1 vote

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
× 10,938

Question asked: Jan 19 '15, 9:59 p.m.

Question was seen: 3,727 times

Last updated: Jan 20 '15, 9:39 p.m.

Confirmation Cancel Confirm