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.
|
One answer
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 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.
Lily Wang
commented Apr 05 '13, 12:34 a.m.
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
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.