It's all about the answers!

Ask a question

How insensitive! Suggestions about RTC naming conventions


Colin Coates (9121) | asked Dec 09 '10, 2:04 p.m.
I have recently had to move from using RTC (and Rational Software Architect) on Linux back onto Microsoft Windows.

As a result of this, I've made some suggestions about file naming conventions whilst using RTC. I've backed-up my suggestions with some explanation that might be unnecessary for more technical people. Anyway, I think I should also get some opinions from people who could be more expert in these matters than I am. I'd value your comments, but please forgive any Linux loving bias you might detect in my post! ;)

Problem summary:
Case sensitive file names can cost you lost productivity when using Rational Team Concert.

Suggested solution:
Standardize on case insensitive file/directory naming by convention.

How to do it:
File and directory names must only consist of lower case letters, numerals, and the hyphen character. For example, rather than naming a file/directory RSA-ModelExecution, we should call it rsa-model-execution.

Detailed explanation:

All current versions of the Windows operating system are inconsistent with respect to case sensitivity for file and directory names. Basically, the Windows GUI shell (also known as Windows Explorer) preserves the display of case sensitive names, but the Windows command (line) shell is case insensitive.

By comparison, UNIX/Linux is consistently case sensitive for file and directory names.

So, sticking with Windows, try this example:
1. Open a Windows command shell.
2. Type notepad COLIN.TXT
3. Click Yes in the dialog Cannot find the COLIN.TXT file. Do you want to create a new file?
4. Type the text Hello, Colin! into the Notepad window.
5. Save the file and exit.
6. Open Windows Explorer and look at the file. You will see a file called COLIN.TXT.
7. Type del colin.txt into the command shell that you previously opened.
8. You will see that the file COLIN.TXT has been deleted from the Windows Explorer window, also.

So, you have just seen that case sensitivity is inconsistent between the Windows GUI and the command line (which is true up to and including Windows 7). The Windows command line is the most accurate reflection of file and directory name handling at the most basic operating system level. Therefore, Windows is fundamentally case insensitive for file and directory names, but this is inconsistently applied throughout the views it provides to the Windows user.

RTC is coded in Java. Java started on UNIX (actually, SunOS/Solaris, I think). UNIX is consistently case sensitive for file and directory names. However, Java is supposed to be write-once-cross-platform (although, in practice, it fails in this aim). Therefore, Java provides an underlying file handling API, which is supposed to handle the issue of differing case sensitivity for file/directory names between different operating systems (and especially between Windows and UNIX). Unfortunately, this API appears to be tricky to use, because Rational Team Concert is inconsistent in its handling of case sensitivity! Although my awareness of this problem has been inflicted upon me due to moving a RTC project from Linux to Windows, investigation has illustrated that this problem can bite anyone at any time, even if they only use Windows!

Recommendation?
Therefore, I strongly suggest that we change our file/directory naming conventions according to my above proposal. Failure to do so will result in other people losing productivity at some time in the future.

Backup information (the first error report):

I don't know how to resolve an RTC synchronization error on the "RSA-Model Simulation" component, and its blocking updates.

The error is:
"There were 1 errors. After correcting the problems, it is recommended that components be reloaded. The reload will be incremental, loading only the missing items. You can further reduce the reload time by reloading just the projects out of sync.

There were 1 errors. After correcting the problems, it is recommended that components be reloaded. The reload will be incremental, loading only the missing items. You can further reduce the reload time by reloading just the projects out of sync.

In order to load /Model Simulation with RSA/Source/rsa8-workspace/.metadata/.plugins/org.eclipse.gmf.runtime.diagram.ui/_8OFcKL__Ed6uCe9MkomcDQ an item just loaded must be deleted. The contents being loaded have case-sensitive names while loading on a case insensitive platform.

There were 1 errors. After correcting the problems, it is recommended that components be reloaded. The reload will be incremental, loading only the missing items. You can further reduce the reload time by reloading just the projects out of sync.

In order to load /Model Simulation with RSA/Source/rsa8-workspace/.metadata/.plugins/org.eclipse.gmf.runtime.diagram.ui/_8OFcKL__Ed6uCe9MkomcDQ an item just loaded must be deleted. The contents being loaded have case-sensitive names while loading on a case insensitive platform"

Although I can navigate to Model Simulation with RSA>Source>rsa8-workspace>.metadata>.plugins>org.eclipse.gmf.runtime.diagram.ui>the-list-of-case-sensitive-file-names...
I cannot see any way to delete the-list-of-case-sensitive-file-names from the RTC repository. Do you have any ideas about how to fix it?

Suggestion from a knowledgeable colleague:

> I had that specific error on your Model Simulation project once.
> Never understood why, and never seen it before on any project. I
> have not fixed the problem. As a matter of fact, I have removed your
> project from my environment to avoid it :-).
>
> I will try to reload your project later today to see if I am still
> having the issue. Will keep you posted

So, in the end I had to recreate a new RTC component and reload the files, after converting the file names to be case insensitive.

Can anyone suggest a better way, that I somehow missed?

12 answers



permanent link
Colin Coates (9121) | answered Dec 15 '10, 9:16 a.m.
Although the problem that I observed is not an RTC specific problem, I was wondering what could be done to help alleviate the issue? As demonstrated by my simple example (regarding the inconsistent handling of case between Windows Explorer and the command line), the issue could occur even if all work is occurring on Windows. However, it does appear to be a corner-case scenario:
1. If a case sensitive version control system is being used,
2. and a case change occurs to a file name...
the problem can manifest.

In regard to point 1, suggested "fixes" are:
a) If the whole team is on Windows, set the version control system to use case insensitive file names.
b) If the team is distributed between Windows and Linux, enforce a naming convention for both teams.
c) If the whole team is on Linux, no specific fix is required.

Although RTC might be enhanced to look for and warn about this type of issue, I don't know how useful that would be?

Although its not a RTC specific problem, perhaps we should provide some help guidance about the issue and its solution?

Maybe the RTC error message could be enhanced to point to some help guidance for cross-platform issues?

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 15 '10, 11:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I agree that an RTC enhancement would help make it easier to avoid this.

In particular, I've submitted work item 148247 "Provide an
out-of-the-box deliver pre-condition that checks whether file names are
case-insensitive unique".

Note that this pre-condition would be selected by the project lead when
they configure their process ... it of course wouldn't universally
applied, since it wouldn't be required for a Unix-only project.

Also, to reiterate an earlier comment, if you aren't getting a
friendly/clear error message at file-load time on Windows when this
situation occurs, please file an RTC defect report with the details.

Cheers,
Geoff

On 12/15/2010 9:23 AM, colinc wrote:
Although the problem that I observed is
not an RTC specific problem, I was
wondering what could be done to help alleviate the issue? As
demonstrated by my simple example (regarding the inconsistent
handling of case between Windows Explorer and the command line), the
issue could occur even if all work is occurring on Windows. However,
it does appear to be a corner-case scenario:
1. If a case sensitive version control
system is being used,
2. and a case change occurs to a file
name...
the problem can manifest.

In regard to point 1, suggested "fixes" are:
a) If the whole team is on Windows, set the version control system to
use case insensitive file names.
b) If the team is distributed between Windows and Linux, enforce a
naming convention for both teams.
c) If the whole team is on Linux, no specific fix is required.

Although RTC might be enhanced to look for and warn about this type of
issue, I don't know how useful that would be?

Although its not a RTC specific problem, perhaps we should provide
some help guidance about the issue and its solution?

Maybe the RTC error message could be enhanced to point to some help
guidance for cross-platform issues?

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.