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

File comparison to display lines changed on 2 streams using RTC CLI

Is there a way through RTC CLI to see number of lines changed in a file present in a component on 2 streams. Basically I want to compare the file on  streams and list the number of changed lines through RTC CLI just the way we have in RTC Eclipse client.

0 votes



One answer

Permanent link

Hi,

You can use "scm diff" command to compare the file of streams. Please see http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m1/topic/com.ibm.team.scm.doc/topics/diff.html

When selecting a file, the "scm diff" can only use the version of the file on disk as the after state, so you need to create a workspace which has same version as one of the stream and load the file to a local sandbox, then use command:

scm diff file -S cp <local-path-of-the-file> stream <2nd-stream-name>

Regards,

Lily

0 votes

Comments

Thanks Lily for your answer. The command gives the output but we also need to appendĀ  -d <local sandbox shared location> else it won't work. Actually the command gives the output but I was expecting it would only result in line different onĀ  streams but what it does is gives you the whole output with a + and - sign. But it still helps. Helps to identify where the line got changed.

Yes, I agree the command can not give you a direct answer. You may need to do some scripting to get the line changed information.

Your answer

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

Question asked: Apr 01 '13, 10:01 a.m.

Question was seen: 7,125 times

Last updated: Apr 05 '13, 12:34 a.m.

Confirmation Cancel Confirm