It's all about the answers!

Ask a question

Linux RTC client checking in read-only DOS-mode files


Marcel Kinard (71107) | asked Jan 15 '10, 11:45 a.m.
retagged Oct 16 '17, 1:34 a.m. by Jie Chen (5103)

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 &quot;Details &gt;&gt;&quot; 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 &quot;&quot;. 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 &quot;chmod u+w license.txt&quot; then I can check it in fine.

The &quot;Error uploading new contents of null&quot; 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!

Accepted answer


permanent link
Michael Valenta (3.7k3) | answered Jan 18 '10, 12:23 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 13 '17, 3:25 p.m. by David Lafreniere (4.8k7)

Marcel,

I suspect the issue is that the default EOL RTC assigns to text files is
PLATFORM. Since the files your were checking in were text, RTC tried
to convert the file to the proper line ending but failed since the file
was read only. It's probably worth opening a defect report for this.

Michael

David Lafreniere selected this answer as the correct answer

Comments
Eitan Shomrai commented Apr 28 '10, 7:36 a.m. | edited Oct 13 '17, 3:26 p.m.

It helped in Windows for read-only XSD files as well. I mean when You change the RO to writable the CI success.
Thanks!

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.