Duplicate an existing stream with new name but it should be unique using rtc lscm command
Hello Everyone,
I am using RTC 606.
I am trying to duplicate an TQC_Major_Stream with new name CR_test_1111 using lscm ccommand.
I used below lscm command
lscm create stream "CR_test_1111" --duplicate "TQC_Major_Stream" -r https://localhost:9443/ccm -u pallavi -P pallavi
But if I executed same command again new stream with same stream name CR_test_1111 created.
So how to restrict creating stream with same name again using lscm duplicate command and also how we can restrict to duplicate stream in particular project area.
Thanks in advance
Pallavi Deore
Accepted answer
I don't believe there is a way to restrict creation of same stream name.
You could probably write a custom precondition under "Save Stream" to achieve this behavior.
Comments
Hi Shashikant,
Is it possible to restrict duplicate command for particular project area.
And How to access UUID of Stream using Stream name. so that I can resolve the issue of ambiguity which comes when stream more than one having same name.
Thanks in advanced
Pallavi Deore
You can restrict creation of streams in a project area based on role. This will apply to both creating a stream as well as duplicating a stream.
Use the -u/--show--uuid option on any command to list the UUID's of the items in the output.
For example: lscm -u y list streams -r repo_url
or in your example: lscm -u y create stream "CR_test_1111" --duplicate "TQC_Major_Stream" -r https://localhost:9443/ccm -u pallavi -P pallavi
Hi Shashikant,
Can you please elaborate project area based on role while duplicating the stream.
One other answer
See https://rsjazz.wordpress.com/2017/02/13/diy-stream-naming-convention-advisors/ for an advisor.
You can easily look at the roles in your project area and search for Stream to see the options you have in the permissions.
The name of the duplicated stream should be changeable. E.g. look here: https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.6.1/com.ibm.team.scm.doc/topics/set_attributes.html
Comments
Hi Shashikant,
you have mentioned in below link
that stream visibility and owned by can be changed using lscm commands.
How we can do it because I have checked in below link
that we can changed attribute value for only workspace,baseline,snapshot and components
But I am not getting any option to change attributes like owned by and visibility of streams using lscm commands
.
Thanks in advanced
Pallavi Deore
Look at the set attributes examples: https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.4/com.ibm.team.scm.doc/topics/set_attributes_ex.html
-w/--workspace option applies to both workspace and stream.
Similarly there is a --ownedby option to set the owner.