It's all about the answers!

Ask a question

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


Stephen Rooks (18232025) | asked Mar 03 '15, 10:42 a.m.
edited Mar 03 '15, 2:21 p.m.
What's the best way of loading an older file version (reverting) using scm.

Thanks,

One answer



permanent link
Shashikant Padur (4.2k27) | answered Mar 03 '15, 9:58 p.m.
JAZZ DEVELOPER
edited Mar 03 '15, 10:00 p.m.
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).

Comments
Stephen Rooks commented Mar 23 '15, 12:00 p.m.

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 ...'


Shashikant Padur commented Mar 24 '15, 12:38 a.m.
JAZZ DEVELOPER

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 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.