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

Incorrect data returned from scm diff

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

0 votes


Accepted answer

Permanent link
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

0 votes

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
× 1,204

Question asked: Feb 04 '15, 11:04 a.m.

Question was seen: 3,400 times

Last updated: Feb 05 '15, 5:15 a.m.

Confirmation Cancel Confirm