It's all about the answers!

Ask a question

RTC SCM: files identical in content detected as pending changes


Giovanni Cenni (111) | asked Jul 30 '20, 4:10 a.m.

Hi everybody,

The pending changes view is reporting a lot of changed files even though i did change only few of them.

I suspect this is due to the fact that the timestamp of the files is different.

Is there an option that would let me detect changes based on the actual content of the files (like git does)?

2 answers



permanent link
Giovanni Cenni (111) | answered Jul 30 '20, 10:42 a.m.

After various attempts i think i figured out what is going on: line delimiters are biting me.

I am running RTC on a Windows machine, so when i load files from the server they have Windows line feed (CR+LF).

But…. the files on the actual development machine have a Unix line feed (LF).

The problem indeed arises when i overwrite the loaded files with the development machine's ones.

What is the recommended way to deal with this issue?

Ideally i would like to just make RTC keep the original line feed characters, but i think this involves treating them as binary files (they are .cpp and .h files, hence text files)


Comments
Ralph Schoon commented Jul 31 '20, 4:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Yes, file delimiter changes are changes as well. In the RTC Eclipse client I think you can set the default line delimiter to be used in the Window>Preferences>General>Workspace. Make sure all use the same. If they are already changed, change them back. Not sure what the most efficient way of doing there is.


Giovanni Cenni commented Aug 01 '20, 10:53 a.m.

Well it would be great if there was a more efficient way to deal with this.


I can bite the bullet and proceed updating the files and create a dedicated commit, but I honestly consider this a weakness of RTC SCM: it would make a lot of sense to simply let users ignore this kind of difference. 


Shashikant Padur commented Aug 03 '20, 11:38 p.m.
JAZZ DEVELOPER
You should commit the files with line delimiter property set to Platform. That way, whether you load in Windows or *nix systems, it will load the files with the appropriate line delimiter for that OS.
The file properties can be set here: Preferences -> Team -> Jazz Source Control -> File Properties.



permanent link
Ralph Schoon (63.1k33645) | answered Jul 30 '20, 7:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 It could also be that someone changed the encoding of the files.


In the Eclipse client, right-click on a file in doubt and select compare with> Previous in Repository.

In the Pending changes view, you can right-click on the change and select Open Compare Editor to see the difference.

Your answer


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.