It's all about the answers!

Ask a question

scm diff stream does not use latest version of files

Martina Riedel (20323341) | asked Oct 23 '15, 3:31 p.m.
RTC 4.0.5

I am running
scm diff -r PROD -c mycomp stream mystream1 stream mystream2

for pretty much all files that were modified and delivered yesterday it pulls the previous version from a while ago (last month, 3 months ago, depending on file) and reports differences.
The diff output has the modified date for each file, so its easy to see.

I tried this on my PC in Cygwin and a Linux server and it is doing it for the same files.

When I compare the individual files in Eclipse, it says "no difference found", as I expected for the files I double checked.
We have many components with many files to compare and if I can't rely on it using the latest version of the file, scm diff is pretty much not usable and I'll have to create workspaces, load both streams and do a regular diff.

Is there a way to make scm diff use latest & greatest?

Geoffrey Clemm commented Oct 23 '15, 5:06 p.m.

I've never seen a problem like this.   When you compare two streams, it should be comparing the current version of each file in those two streams.  What happens if you compare the two streams in Eclipse?

Martina Riedel commented Oct 23 '15, 8:26 p.m.

this is scm diff, not scm compare.
in Eclipse, there is only compare at the component and stream level. I've looked for the "change summary" that is there when you look at file history but have not found it.
So the compare in Eclipse shows me changesets that are in one stream but not the other, which doesn't help. We have merged some of it and also done some double updates and I need to compare at the file level.

Geoffrey Clemm commented Oct 23 '15, 11:04 p.m. | edited Oct 23 '15, 11:05 p.m.

In recent versions of RTC, in Eclipse, you can multi-select all of the change sets reported from the compare, and select the "Open_with ... -> Change Summary" operation.   In the Change Summary view, you can browse down to the file in question, and double click on the entry for that file, to get a diff for that file.   I don't remember whether that option is available in 4.0.5.

But back to your question ... I checked, and there was at least one bug that seemed related to your post: Incorrect data returned from scm diff command (344757) .   To see if this is the bug you are running into, try swapping the order of the two streams you are comparing.   If that fixes the problem, then you probably are encountering bug 344757 (being fixed in 6.0.2).

If not, I'd suggest filing a defect.

Martina Riedel commented Oct 25 '15, 9:50 a.m.

That Change Summary thing doesn't work quite right (at least in 4.0.5), when you compare streams. In the Change Explorer it shows "Changesets only in stream1", "Changesets only in stream2" and you can only select the changesets of one of them to open the summary. and in the Summary it shows the files, but compared to the stream those changesets are in. And if I click on a single file and say "compare with" I get an error "Please select exactly 1 file to compare".

Back to the scm diff not picking the latest version, when I switch the args I get more bad diffs. The java code in those 2 streams for that component is actually identical. I verified that by loading workspaces and diffing.
One way I have 21 bad diffs, the other way 27.
What is similar to that defect is that a merge with conflicting changes and even a gap resolution has been done in that component.
The other components where we definitely have the issue (because there is an easy to identify change when we fixed "smart quotes") also have merges, but no gap resolution.

Martina Riedel commented Oct 25 '15, 9:50 a.m.

(ran out of characters allowed)

I can open a defect, but if you want examples and details, we probably also need a PMR. Let me know.

Geoffrey Clemm commented Oct 25 '15, 8:34 p.m.

Yes, a PMR is probably required for this.

Martina Riedel commented Oct 26 '15, 3:59 p.m.

PMR 54212,442,000 created

showing 5 of 7 show 2 more comments

Be the first one to answer this question!

Register or 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.