It's all about the answers!

Ask a question

Find recent changes in a stream


Nils Hendricks (122) | asked Apr 11 '14, 9:54 a.m.
Hello,

i need to get all changes since a certain timestamp from our streams on file level.
My approach was to use the "scm show history" command. I have 2 problems there:
1. I cannot specify a timestamp, only the number of results.
2. In my (json-)results the file paths are missing (e.g. "path": "\\<unresolved>\\config.xml" instead of "path": "\\myProject\myFolder\config.xml" which would be the correct path of the file in the component).

I dont want to create real sandboxes where at least nr. 2 would be fixed because we have hundreds of components.

I there a chance to get these informations using the Java API? Is it possible then to also get this based on a snapshot rather than a stream?

thanks & regards, Nils

2 answers



permanent link
Tim Mok (6.6k38) | answered Apr 11 '14, 11:37 a.m.
JAZZ DEVELOPER
If you can compare the stream to a past snapshot, you can get a list of differences. I would recommend changing your work flow to create snapshots at points you know you would want to compare with at a later date. This is first suggestion I can think of since you can show history of a stream/workspace/snapshot. You can show history of a component but again you're limited by the number of results instead of specifying a date range.

Comments
Nils Hendricks commented Apr 14 '14, 2:35 a.m. | edited Apr 16 '14, 1:40 a.m.

Thanks a lot for your quick answers !
I will give comparing snapshots with "scm compare" a try. Then the file paths are resolved although i dont have a sandbox. I fear that using "list changesets" and "list changes" will result in a lot of more interaction with RTC than the snapshot approach.

Is the fact that the paths in my json retrieved by "scm history" are not resolved a bug or does it work like designed?


Shashikant Padur commented Apr 14 '14, 10:17 a.m.
JAZZ DEVELOPER

It could not resolve the path because I believe you did not provide the workspace option when running the scm history command. Try by providing the workpsace info.


Nils Hendricks commented Apr 14 '14, 10:56 a.m.

I did specify a workspace (in my case it is a stream). Here is the command i started:
scm show history -j -r <ourRepositoryUrl> -u <userId> -P <password> --component seu_bld-source -w seu_bld-04.26.00-dev


permanent link
Shashikant Padur (4.3k27) | answered Apr 13 '14, 11:33 p.m.
JAZZ DEVELOPER
edited Apr 13 '14, 11:34 p.m.
In RTC, the changes are checked in to a changeset. You can get the latest changesets by using "list changesets" command.
For ex: 
To list the latest changes for a workspace or stream: lscm list changesets --workspace &lt;workspace or stream name/uuid&gt; --created-after &lt;timestamp&gt;
If you would like to narrow your listing to a component specify the --component option along with the --workspace option. You can also specify the type of file change such as addition/modification etc. Take a look at the help for more information.

You can then list the changes in the change set using "list changes" command.

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.