It's all about the answers!

Ask a question

how to checkout a specific version of a commit in a separate directory using lscm?


Ved Kpl (137) | asked Mar 10 '21, 10:22 a.m.
edited Mar 10 '21, 10:22 a.m.

Is there an easy way to checkout a a specific version of a commit (that has multiple files changed) into a separate directory?


Currently , I have to do "lscm list changes <commit_uuid> -j", then extract the state-uuid of each file from the output,  and then for every file run "lscm get file -r https://localhost:9443/ccm <commit_uuid>  <state_uuid>  <out_file_path>" . This is pretty cumbersome. Is there a single command that can do the trick for me? Something like "git --work-tree=<workdir> --git-dir=<gitdir> checkout <commit_id>"  in git.


Comments
Geoffrey Clemm commented Mar 10 '21, 10:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just for interest's sake, why do you want to do that? 


Ved Kpl commented Mar 10 '21, 10:40 a.m.

I think this is a very basic usecase. I would like to move to a specific state of the code, when debugging or something like that.


Geoffrey Clemm commented Mar 10 '21, 1:14 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It makes sense to have some components of a workspace loaded onto disk, but why a single change set? 

Be the first one to answer this question!


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.