Using command line (scm) how do I revert to a previous file version in the sandbox?
One answer
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 <changeset uuid/alias>'.
3) Run 'lscm get change <changeset uuid> <item id> <path-to-download>'. You could also use 'lscm get file'
In 502, 'lscm get file' accepts version id (although it still accepts state id).
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.