Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 &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!

0 votes


Accepted answer

Permanent link

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

0 votes

Comments

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 56
× 38

Question asked: Jan 15 '10, 11:45 a.m.

Question was seen: 6,515 times

Last updated: Oct 16 '17, 1:34 a.m.

Confirmation Cancel Confirm