It's all about the answers!

Ask a question

Incorrect data returned from scm diff


David Knibb (32) | asked Feb 04 '15, 11:04 a.m.
Hi Jazz Support,
I have a problem using the scm diff command. It appears to be returning the wrong diff! Please could you help to explain this for me?

The scenario is as follows:

We have multiple releases of a product, serviced and maintained using Rational Team Concert as the source control library. Changes made at one release also need to be made at all higher releases. We achieve this by flowing the change set from one stream to the next.

One user has made a one line change at Release1. That change set has been completed. and delivered into the stream representing Release1. Another user is attempting to deliver this change into Release2, using some tooling which relies on the scm tool. The scm diff tool is producing an incorrect diff, and this is causing the process to fail.

In more detail:
We now have a repository workspace, with a flow target of the "Release2" stream. That workspace contains two change sets.
- cs1 -- is the one line change made to FileA in Release1
- cs2 -- is the merge change set, resulting from merging cs1 into Release2 (FileA has been modified in Release2 so a merge change set of this nature is unavoidable).

Using the RTC Client, Pending Changes view. Both change sets are visible as outgoing changes in the workspace. Double clicking FileA in cs1 will show the 1 line change. Double clicking FileA in cs2 will (very unhelpfully!!) show the differences between FileA in Release1 and Release2. What you want is the net change of how both change sets together will modify the code in Release2. (To do this you need to Right Click and select Compare With->Remote, then select the backing stream. RTC of course already knows what the backing stream is so we opened RFE 58679 to address this.) If you do the compare in this way, we can see that the effect of both changes sets combined is to make the same one line change originally made at Release1.

Now using the scm command line tool, we issue:
scm load --repository-uri <repo>  --force "MyRelease2Workspace" "dir/FileA"
scm accept
scm diff --repository-uri <repo> workspace "MyRelease2Workspace" stream "Release2"


The diff returned by scm diff is the comparison of the active change set (cs2) with its direct predecessor (cs1). and not the cumulative effect of both, even though we explicitly specify that we wish to compare the workspace with the stream.

Please could you investigate this?
We are using RTC V4.0.6.
Kind Regards, David

Accepted answer


permanent link
Shashikant Padur (3.9k27) | answered Feb 04 '15, 11:49 p.m.
JAZZ DEVELOPER
edited Feb 04 '15, 11:49 p.m.
As I understand you have cs1 (from Release1) and cs2 (as a result of merge) in your workspace 2 and both are outgoing change sets to flow target Release2.

I just tried that scenario and the diff showed me the changes from both cs1 and cs2. Note: The change sets had only one file change.

You should raise a defect and provide exact steps (preferably with sample files) to reproduce the issue.
David Knibb selected this answer as the correct answer

Your answer


Register or to post your answer.