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

What is the UUID of the current changeset?

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

0 votes



One answer

Permanent link
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.



1 vote

Comments

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?

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 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
× 12,105
× 1,206
× 21

Question asked: Jan 14 '14, 11:29 a.m.

Question was seen: 6,958 times

Last updated: Jan 15 '14, 4:36 a.m.

Confirmation Cancel Confirm