It's all about the answers!

Ask a question

How to change RTC snapshot name at all places (including in the pending changes view snapshot)


Tushar Mehta (155) | asked Jul 08 '16, 1:15 a.m.
edited Jul 11 '16, 11:12 a.m. by David Lafreniere (4.3k7)

My requirement is, I want to maintain a RTC stream snapshot of a build passed code all the time. So that any time a developer wants to accept the changes, he can just accept the changes based on that snapshot.

I am following this approach, when a build start, I crate a snapshot as “Build_in_progress” and once the build is successful, I want to rename the same to “Good_code”.

I used the below command to rename the snapshot. It changes the snapshot name, but in pending changes, I can still see the old snapshot name “Build_in_progress” and when I search for the snapshot in stream I see the new name “Good_code”.

Is there any way, I can have the updated name in pending changes. So that developer will know what code is verified and can be accepted for their work.

Accepted answer


permanent link
Ralph Schoon (55.8k23642) | answered Jul 08 '16, 2:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 08 '16, 2:53 a.m.
There is no command shown that you use.

A snapshot is am object and the object carries the name of the snapshot. If you change it it is changed anywhere.

In the pending changes view, what the user can see is the baselines on the components. The user can not see the snapshot there for all I know. This explains what you see, too. The snapshot is created. Since a snapshot refers to baselines on components, baselines are created if needed for the snapshot. You see these baselines in the pending changes view. The names of the baselines created are derived from the snapshot. Renaming the snapshot does not rename the baselines.

There is no accept operation based on snapshots. You can only accept baselines on individual components.
Tushar Mehta selected this answer as the correct answer

Comments
Tushar Mehta commented Jul 08 '16, 4:56 a.m. | edited Jul 08 '16, 4:58 a.m.

I am using scm following command to rename a snapshot.
scm set attribute -s <<snapshot-name>> --name <<new snapshot name>> -r -u -P

If I understand it correct, a snapshot also creates a baselines on component. And probably with the same name as snapshot name. Is there a way, I can rename that baseline ?

I tried command as
scm set attribute -b <<snapshot-name>> --name <<new snapshot name>> -r -u -P
But that give as baseline not found.


Ralph Schoon commented Jul 08 '16, 5:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

See https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/set_attributes.html&scope=null

I would really suggest you look into the documentation. You have to provide the component name - just read the help.


Tushar Mehta commented Jul 11 '16, 11:08 a.m.

Thanks for the pointer. I renamed the snapshot using the alias and that worked.  I am not sure, why the name was not working there.

One other answer



permanent link
David Lafreniere (4.3k7) | answered Jul 11 '16, 11:12 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
It sounds like you could take advantage of the "Post-build Deliver" feature.
-Create a Build Definition with the "Post-build Deliver" option enabled
-Crete and pick a target "green stream" where you want developers to accept from, and where you want the build to 'push' it's changes to when complete.
-Set the "trigger policy" to "Deliver if build has no errors or warnings".

This way developers are only accepting from the 'blessed/green builds'.

See the following article for additional details: https://jazz.net/library/article/649

Comments
Tushar Mehta commented Jul 12 '16, 12:57 a.m.

Thanks a lot this is going to help in my another requirement of code promotion to green stream.

Your answer


Register or to post your answer.