It's all about the answers!

Ask a question

RTC SCM: files identical in content detected as pending changes

Giovanni Cenni (11) | asked Jul 30, 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
Ralph Schoon (56.7k23642) | answered Jul 30, 7:41 a.m.

 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.

permanent link
Giovanni Cenni (11) | answered Jul 30, 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)

Ralph Schoon commented Jul 31, 4:18 a.m.

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 2 days ago

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. 

Your answer

Register or to post your answer.