Linux RTC client checking in read-only DOS-mode files
I inherited some source code from another team and was checking it into the RTC SCM. I have the RTC 2.0.0.1 Linux client connected to a v2 server. The source code I inherited was coming from Linux people, so the text files should have only \n line terminators. And the files (due to historical reasons) were read-only in my workspace (chmod 444).
When trying to check in the files, it failed and I received the following dialog:
<pre>
Problem Occurred
'Check-in' has encountered a problem.
Checking-in changes to a new change set
</pre>
I clicked the "Details >>" button and saw the following text:
<pre>
Checking-in changes to new change set
Error uploading new contents of null
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
Error uploading new contents of null
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
File /src/license.txt is read-only.
</pre>
After loading the referenced file /src/license.txt into vi, vi said on its status line "". After some playing around I discovered that this problem occurs only when both the file is read-only and has \r\n for the line termination (DOS mode). If I strip the \r terminators from the file, or if I "chmod u+w license.txt" then I can check it in fine.
The "Error uploading new contents of null" message was not helpful, and appears to be a bug in the message content.
I would hope that I can check in read-only files, assuming I have good reason to do so, even if they may need to be in DOS mode. In this case, the files didn't need to be in DOS mode, that was an oversight by the original author, so I patched them to remove the \r terminators.
However, it feels like there is a bad behavior here in the RTC client and would ask that this be evaluated by the product team.
I wanted to let folks know, so the next person that hits this problem can try this workaround. It killed me for a couple hours. Even after patching the files from a bash prompt, I needed to tell RTC to Refresh the project from disk before it would see the patch.
Thanks!