It's all about the answers!

Ask a question

How to download previous version of file in SCM?


Shuchita Tripathi (31436595) | asked Jul 21 '14, 8:11 a.m.
 Hi,
The scenario is:
My current version is say v5.0. But due to some reason, I want to download an early version (v2.0) and work on it. I do not want to discard the current version. 

Is there a way to achieve it? I can see that view and compare options are available for early versions, but i didn't find a way to download the file.

Another thing, 'Replace with baseline' replaces the whole component (i.e. all the files in it) with the early version. What if there is a situation where only  few files needs to be replaced. How to achieve that?

Comments
Geoffrey Clemm commented Jul 21 '14, 2:49 p.m. | edited Jul 21 '14, 2:49 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

When you say "work on it", do you want to check-in the results of that work ? 
If so, you will need a repository workspace that you check the results into.
When you say "do not want to discard the current version", does that mean that you want to leave that version of the file in place in the sandbox with its current name (i.e. you want both the current version and the earlier version of the file loaded into the sandbox)?


Shuchita Tripathi commented Jul 22 '14, 5:50 a.m.

Hi Geoffrey,


Currently, I am trying this functionality to suggest to a customer. So I am looking for all possible scenarios.

As suggested by Chris in the below answer, I am now able to download previous version files. However, that file is overwriting my current version of file. Is there a way that I load the file in some other folder?

Accepted answer


permanent link
Christian Morgan (317714) | answered Jul 21 '14, 9:57 a.m.
If you go to a specific stream/component and perform the right--click context menu option to show repository files and from the repository files view, expand to the specific file and right--click choosing show history, once in the history view you can then select the change set that contains the prior version of the file, right--click and choose "load".

You can then bring down that specific version of the file into a local sandbox.  There are certainly other ways to get to the prior version, quicker if you know what stream and component that has the version you're looking for, assuming you don't know that, then change set and other history views will be the best way to sort through them all.

The way I describe will allow you to replace specific files from version history down to the local sandbox.  You could also just swap out local history for the loaded version.  There is no way I know of to "multi" select a collection of files and replace what was loaded in the component through the RTC UI.

-Chris
Shuchita Tripathi selected this answer as the correct answer

Comments
Shuchita Tripathi commented Jul 22 '14, 5:46 a.m.

Hi Chris,


Thank you for your explanation. I am now able to download previous version files. 

Is there a way I can load these files in some other folder (not in the sandbox)?
Also, could you please tell me other ways also, for downloading prior version (assuming we know the stream/component).


Tim Mok commented Jul 22 '14, 9:02 a.m.
JAZZ DEVELOPER

You can try the "Load As" action to load to a specific location.


Shuchita Tripathi commented Jul 23 '14, 1:30 a.m.

 Hi Tim,


I don't find any Load As option here. Please have a look at the screenshot.


Geoffrey Clemm commented Jul 23 '14, 2:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The "Load As" option is only available in the Repository Files view, so unless you happen to know a baseline/stream/workspace that contains the version you want, this wouldn't help you.   But one workaround would be to unload the component containing the file you want to load a different version of, and then invoke the "Load" command from the history view.   You'll get a prompt asking you where in the file system you want to load it.

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.