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

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

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.

0 votes

Comments

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

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.

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 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
× 7,492
× 1,321

Question asked: Mar 10 '21, 10:22 a.m.

Question was seen: 971 times

Last updated: Mar 10 '21, 1:14 p.m.

Confirmation Cancel Confirm