It's all about the answers!

Ask a question

Can anyone provide help in obtaining the beginning and end versions of files changed for a work item?


Jamie Berry (14013079) | asked Nov 11 '15, 4:42 p.m.
I have a user who needs to calculate SLOC for all the changes associated with a work item in the context of a Stream or Workspace.  I am looking at the SCM command line to see if I can find all the commands he would need to use to script up this type of investigation.   I seem to be getting close, but I can't make the final step.   Basically, he needs to get a list of all the files that were changed in the change sets tied to the work item, then get the version of the file represented by the last change set and get the initial version of the file for the first change set.  The commands I have found that get me close so far are:

lscm list changesets -W <workitem id>

collect the list of change sets and then feed them into:

lscm list states -w <stream> <change set>

This gives me a list of files changed, but how can I use this information to use lscm get file to load the specific states of the files?  The get command seems to be asking for a version id not a state id and I don't see a way to get the versions for the file.

Does anyone have any suggestions on how to obtain the beginning and ending states of all the files changed in the change sets tied to a work item???

Thanks,
Jamie.

One answer



permanent link
Jamie Berry (14013079) | answered Nov 12 '15, 2:33 p.m.
 A co-worker helped me with this...  If I request json output (-j), then I get the uuids of the file states.  Using this, I can get the states needed.   I don't know if there is another way, but this should meet my needs.  Would love to hear other suggestions still though.

Your answer


Register or to post your answer.