Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Using command line (scm) how do I revert to a previous file version in the sandbox?

What's the best way of loading an older file version (reverting) using scm.

Thanks,

1 vote



One answer

Permanent link
1) list the history of the file 'lscm -u y show history <filepath>'.
2) Figure out the change set from which the change has to be downloaded and run 'lscm -u y list change &lt;changeset uuid/alias&gt;'.
3) Run 'lscm get change &lt;changeset uuid&gt; &lt;item id&gt; &lt;path-to-download&gt;'. You could also use 'lscm get file'

In 502, 'lscm get file' accepts version id (although it still accepts state id).

1 vote

Comments

Thanks for the reply. When trying to load an older version of the file into the sandbox I get the following error:
Problem running 'get file':
Path to load on disk cannot be a descendant of the sandbox.

How do I get around this? I see the same error if I use 'lscm get change ...'

I didn't think that 'get file' and 'get change' would bother about where the file is being downloaded because it does not update any metadata (but I might be wrong).
Try providing a path outside of the sandbox and see if that works.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 1,202
× 158

Question asked: Mar 03 '15, 10:42 a.m.

Question was seen: 5,099 times

Last updated: Mar 24 '15, 12:38 a.m.

Confirmation Cancel Confirm