It's all about the answers!

Ask a question

scm change sets ordered by date added

Gergely Mincsovics (258) | asked Feb 17 '17, 11:21 a.m.

Hi All, my question is about the command line interface, scm. I would like to traverse change sets from the command line, chronologically, as they were added to the workspace. For this I used the following,

scm --show-uuid y list changesets -r <repo uri> -u <user> -w <workspace> -m <max number of change sets to list>
The list of change sets returned looked ok at first sight. However, I realized later that the order is not correct. By accepting the changes one by one to a forked workspace ended up in error messages
The change sets that you are accepting are built on change sets that are not in your repository workspace. Either accept all change sets using the "accept-missing-changesets"
Unfortunately, the suggested accept-missing-changesets also did not help, and it is not acceptable to me either. It is not acceptable, because I want the traversal to happen change set by change set and not on groups of change sets.
Next I tried the options --created-after and --created-before, but these I cannot use, since the change set creation date is irrelevant to me. I need the change sets ordered by the time they entered the workspace. Finally, the -json option does not give the date added either.
On the other hand, I saw that the RTC client gui has got both date created and date added fields. It means that the data is available.

Note that my preference is to get the list of changes of the complete workspace, not just for a component. Additionally, I prefer using scm to other tooling. Using the java api would be also fine though. It must work from the command line, otherwise the integration with other tooling would not be possible.

Build Id: RTC-I20140807-0233


Geoffrey Clemm commented Feb 17 '17, 7:28 p.m.

You might want to explain why you are doing this traversal ... there might be a better way of obtaining the data.   

Gergely Mincsovics commented Feb 20 '17, 3:50 a.m.

to find in an automated way at which change list exactly a test went wrong

Accepted answer

permanent link
Shashikant Padur (4.2k27) | answered Feb 19 '17, 10:37 p.m.

Use 'scm show history' shows the history of the workspace/component in chronological order. It also shows the created date and added date.

Gergely Mincsovics selected this answer as the correct answer

Gergely Mincsovics commented Feb 20 '17, 3:44 a.m.

Hi Shashikant, I did not know about show history. It does show the 'date added'  field to second precision, and it follows the data added chronological order, too. This brings me closer to the solution, thank you! The only bad surprise is that it requires a component parameter next to the workspace parameter.

Unable to determine component. Specify component.

So I cannot get the merged workspace history out of this command. Is there some way to do that with scm or java api?

Shashikant Padur commented Feb 20 '17, 5:44 a.m.

I am not sure. Probably you could raise a work item to say that you need the workspace history without specifying the component which should show the history across components.

Gergely Mincsovics commented Feb 20 '17, 9:53 a.m.

how can I do that?

Shashikant Padur commented Feb 20 '17, 10:58 p.m. | edited Feb 20 '17, 10:59 p.m.
JAZZ DEVELOPER and click on "Submit a bug" button on the top right corner.

Gergely Mincsovics commented Feb 24 '17, 11:47 a.m.

Shashikant, my first impression of scm show history was that it showed the history chronologically by date added. This is true. However, I saw a severe limitation. It only shows the first 100 records no matter how I set the maximum (-m option). Is there a way to circumvent this?

Shashikant Padur commented Feb 27 '17, 6:01 a.m.

I believe this was fixed in 6.0 and later versions.

Gergely Mincsovics commented Jun 14 '17, 10:37 a.m.

6.0.1 says
'The maximum number of change sets that can be requested in 1000'

Shashikant Padur commented Jun 16 '17, 5:19 a.m.

I believe that is the limit as of today.

showing 5 of 9 show 4 more comments

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.