How do I use the RTC CLI to automatically associate a change set to a work item via checkin?
Hello,
Does the scm checkin command return the id of the changeset that I can catch and then use for the scm changeset associate command? How do I automate these two steps into a single step?
I am using the RTC CLI with RTC server version 4.0.0.1.
What I would like to do is check-in a file to a repository workspace and automatically have that changeset be associated to a work item. The CLI command to associate a changeset is scm changeset associate (changeset id) (work item id). I already know the work item id, but the changeset id is only created during the check-in process.
Does the scm checkin command return the id of the changeset that I can catch and then use for the scm changeset associate command? How do I automate these two steps into a single step?
Thank you and best regards,
Andrew
One answer
The checkin command output shows the change set(s) that the file(s) were checked into. To display the UUID of the change set, run 'scm -u y checkin ....'. If you are doing this in the script, you should run 'scm checkin --json ....' to display the output in json format and parse that output rather than plain text output. I believe --json option to commands was introduced in 4.0.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 13 '13, 3:41 a.m.