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 |
One answer
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.
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
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.