It's all about the answers!

Ask a question

Is it possible to download all history versions of a specific file in one step ?

Katrin Heymann (19824363) | asked Dec 03 '14, 9:51 a.m.
I have a file in RTC source control with more than 100 versions and now I'm searching for a way to download all versions in one step.

Is it possible ?

sam detweiler commented Dec 03 '14, 10:36 p.m.

But what would you do with 100 files of the same name? 

Katrin Heymann commented Dec 04 '14, 3:37 a.m.

If you mark the "history" files in the eclipse client and select "Open File" then you can save file by file and they have "different" names - file name + "internal id".

But it doesn't help to save these files without their change comment.

My customer wants to compare the files before a change request - after a change request.

One answer

permanent link
Shashikant Padur (4.2k27) | answered Dec 03 '14, 10:01 p.m.
edited Dec 04 '14, 4:04 a.m.
You can use the scm cli to do these kind of operations.
If you have the item id and state/version id's then you can use the 'scm get file <item id> <state or version id> <path on disk>'
If you do not have the item information you can fetch the history that shows the item id and state id/version id by using the 'scm -u y history -w <workspace or stream name/uuid> -C <component name/uuid> -R <path relative to the component>'

Also take a look at 'scm get change' which downloads a specific change from the change set.

Katrin Heymann commented Dec 04 '14, 3:34 a.m.

Is it possible to include the change comment into the download ?

Shashikant Padur commented Dec 04 '14, 4:03 a.m.

This history command shows the change set comment in the output. You also use the --json option to get the output in json format.

Your answer

Register or to post your answer.