It's all about the answers!

Ask a question

What is the UUID of the current changeset?


Eddie Breeveld (6112530) | asked Jan 14 '14, 11:29 a.m.
We need to use scm to check-in changes to RTC via Windows DOS script.  To be able to manipulate any changesets most scm commands need an ID or UUID of some sort.  In particular we need to associate the changeset with a work item (known in advance) and then to deliver the changeset.
As we are always manipulating the latest or current changeset, is there a way of getting the UUID of the current changeset into an environment variable or an alias that we can use in the associate and deliver commands?

This is the sort of thing we would like to do.  Is it possible?
cd C:\Testing\Main
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" login -r %URL% -n RTC_TEST -u %USER% -P %PASSWD% -c
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" checkin %FILENAME%
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" changeset comment -r RTC_TEST "A TEST COMMENT"
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" changeset associate -r RTC_TEST 19269
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" deliver -r RTC_TEST
call "C:\Program Files\IBM\TeamConcert\scmtools\eclipse\scm" logout -r RTC_TEST

One answer



permanent link
Shashikant Padur (4.2k27) | answered Jan 14 '14, 10:37 p.m.
JAZZ DEVELOPER
In 4.0.6 (upcoming release) we have the capability to set a comment and associate a workitem to a change set when performing a checkin.

For now, you have to parse the output of the checkin command in you script to get to the UUID of the change set. To display the UUID of items specify the -u option: "scm -u y checkin ..." or use the -j/--json option: "scm checkin --json ..." which will print the output in json format.




Comments
Eddie Breeveld commented Jan 15 '14, 3:51 a.m.

Thanks.  We'll have to wait until 4.0.6.  Unfortunately the ability to interpret json format is not readily available in a Windows Batch file. 
Incidentally, we were using the Microsoft TFS API to perform some of these tasks - is an API available for RTC?


Shashikant Padur commented Jan 15 '14, 4:25 a.m. | edited Jan 15 '14, 4:36 a.m.
JAZZ DEVELOPER

Yes, java api's are available to perform scm operations. If you search in this forum you should find couple of examples. 


By the way, if you want to parse minimal output, you could try the following:
1) Create the change set with a comment: scm -u y -a n create changeset "My comment"
2) Parse the uuid
3) Checkin the file: scm checkin <file1> -c <change set uuid>
4) Associate the workitem: scm changeset associate <change set uuid> <workitem number>

Your answer


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