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
Ralph Schoon (63.1k33645) | answered Dec 09 '10, 2:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Colin,

the issue you report is synchronization.

Is this s Clear Case synchroniztion? If not, just forget my answer below.

If it is the issue you are facing might be that ClearCase is case sensitive and windows is not, rather than RTC is and Windows is not. In the past, I think I remeber, there was a way to set ClearCase to Case Insensitive AND Case Preserving. I think that was a suggested setting especially with respect to Java and Eclipse. Not sure when that needed to be specified. I think on install time. Maybe others can chime in. That should avoid your issue on windows.

permanent link
Walter Mansur (63613017) | answered Dec 09 '10, 3:02 p.m.
Hi Colin,

I think your idea has some merit and development teams would be wise to adopt something like it. Of course, teams can adopt all sorts of "ground rules". However, doing so does not prevent such issues as you have described, at least not 100%. Read on for an interesting situation involving 2 files with the same name that happened to us about a year ago. Maybe this can be of help to you in your situation.

We found out that it is possible to have 2 files with the same name, except for the case of the file name, exist in the same folder in RTC (in Windows). For example, you could have ABC.txt and abc.txt. I know, you would think that Windows would have overwritten one or the other. In Linux, these would have been 2 different files. As I mentioned above, it happened to us, almost a year ago. We are a Windows shop and have a team that works with COBOL. (Don't laugh - your paychecks are probably processed and printed out by a COBOL program). 2 files, one named ABC.txt and another named abc.txt were both delivered to a component used by this team. Of course, this caused a workspace "sync" issue. I believe that this is also known as an "Evil Twin" situation. We first tried to fix the issue by adding one of the files to the .jazzignore file. This did not work for us. So, we turned to the IBM RTC development team for help. Heather Fraser-Dube was very helpful in getting our situation resolved. The following is from RTC Work Item 104433, comment #2:

====

What I would suggest to get around this is :

For example purposes Suppose the problematic files are "ABC.txt" and "abc.txt". You want to delete "ABC.txt" and keep "abc.txt".

Revert your .jazzignore file to not ignore the problem file.

- Load, the load will tell you about the file that it couldn't load because it encountered with the case issue. However, one copy of the abc file (either ABC.txt or abc.txt) got loaded. Locate that file and delete it.
- Checkin the deletion, when you do this you will get a warning dialog telling you that you should proceed with caution. Click OK and have the deletion checked in.
- Reload the component again. This time it should load without problems.
- If the file you deleted is the version you didn't want, you are done
- If the file you deleted is the version you want, locate the file ("ABC.txt") and delete it.
- Checkin the deletion into the same change set. Now both versions of the file are deleted.
- In the change set select the file you want to keep ("abc.txt") and from the context menu choose to undo that change.
Now you are done.

You only need to deliver the change set.

=====

That worked for us. Aside from this one issue, We haven't had much trouble with using mixed case files in RTC. Of course we are only working in Windows and that is a slightly different case than yours.



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?

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 09 '10, 10:53 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Ralph,

Based on the reported error messages, this is not a ClearCase
synchronisation, but rather a problem encountered during the "load" by
the RTC SCM component.

But your comments about setting the ClearCase Case Insensitive and Case
Preserving MVFS properties are correct (the CC Synchronizer will give
you a warning message if they aren't set).

Cheers,
Geoff

On 12/9/2010 2:53 PM, rschoon wrote:
Hi Colin,

the issue you report is synchronization.

Is this s Clear Case synchroniztion? If not, just forget my answer
below.

If it is the issue you are facing might be that ClearCase is case
sensitive and windows is not, rather than RTC is and Windows is not.
In the past, I think I remeber, there was a way to set ClearCase to
Case Insensitive AND Case Preserving. I think that was a suggested
setting especially with respect to Java and Eclipse. Not sure when
that needed to be specified. I think on install time. Maybe others
can chime in. That should avoid your issue on windows.

permanent link
Colin Coates (9121) | answered Dec 10 '10, 4:52 a.m.
I think your idea has some merit and development teams would be wise to adopt something like it. Of course, teams can adopt all sorts of "ground rules". However, doing so does not prevent such issues as you have described, at least not 100%. Read on for an interesting situation involving 2 files with the same name that happened to us about a year ago. Maybe this can be of help to you in your situation.


OK. Unfortunately, some people are saying that Camel Case naming conventions have worked just fine up until now (even though we know that's just an accident waiting to happen if you are on Windows).

We found out that it is possible to have 2 files with the same name, except for the case of the file name, exist in the same folder in RTC (in Windows)... I believe that this is also known as an "Evil Twin" situation.


Wow, Evil Twins! Thanks for mentioning this because it lead me to read the IBM article About Evil Twins...
http://www-01.ibm.com/support/docview.wss?uid=swg21125072

permanent link
Colin Coates (9121) | answered Dec 10 '10, 5:11 a.m.
Based on the reported error messages, this is not a ClearCase synchronisation, but rather a problem encountered during the "load" by the RTC SCM component.


The About Evil Twins article says:
PREVENTION TRIGGERS

The best solution used to control the creation of evil twins is to implement a pre-operational trigger during the mkelem/ add to source control operation.

The objective of the trigger would be to search the directory version tree for an element of the same name prior to creation of the new element.

In other words, the script used by the trigger will be required to look for two different files, with the same name, in two or more different versions of the same directory.

Note: Depending on the number of versions and branches on the directory, this could take some time, thus leading to potential performance degradation around the mkelem operation.


A request for enhancement (RFE) has been submitted requesting that ClearCase provide a built in prevention of evil twins. Refer to ID 1327 RATLC01033987) on the Rational Software RFE Community for further information or to post comments and add yourself to the watchlist for this RFE.


However, I agree that the RTC SCM integration module should probably check for this pernicious issue, especially since RTC is intended to integrate with more than just clear case. Although every well designed cross-platform version control system must deal with the Windows/UNIX file name issue, its actually the RTC SCM integration module that is first in the firing line whenever something goes wrong.

Does anyone know whether there is already a problem report for this issue?

permanent link
Colin Coates (9121) | answered Dec 10 '10, 5:21 a.m.
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 :-).


Based on a very small sample size, this comment appears to suggest that file name handling in the RTC client is fundamentally broken for teams distributed between Windows and Linux users. Is this really true, or am I missing something?

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 10 '10, 9:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Just to be clear, this scenario (two files with different names collide
on Windows because of the IgnoreCase semantics of Windows) is not what
"Evil Twins" refers to.

An evil twin occurs when to developers create a file with the same name
on two branches, and then there is namespace collision when the work
from those two developers is merged. In some cases, where the
developers happened to just randomly pick the same name, the resolution
is to just rename one of the files. In other cases, where they were
actually creating content for the same file (e.g., both created a
"Makefile"), the resolution is to merge the contents of the two files,
and then discard one of the files. The reason it is "evil" is that if
there is subsequent development which makes changes to the file that was
discarded, the target for those changes no longer exists, so the
ClearCase magic that makes it easy to merge in changes does not work.

So back to this case ... it is not an evil twin, because the two files
aren't actually twins ... they just look like twins on Windows. On Unix,
those two files co-exist perfectly well ... it is only a problem when
those two files are loaded into a Windows file system, where only one of
them can be loaded.

In a ClearCase dynamic view, it is very hard to give a good error
message in this case, because one is limited to the error codes provided
by the underlying file system.

But in a copy-based file area (such as an RTC sandbox, a ClearCase web
view, or a ClearCase snapshot view). The file system loader should
detect this condition and give a reasonable and clear error message.
If it doesn't that is a bug, and please submit a bug report on it.

But note that the fact that RTC allows you to create two files in the
same directory that differ only in case is a feature ... not a bug. The
RTC repository has to support Unix, where that is a perfectly valid
situation ... it is only the attempt to load this into a Windows file
system that is an error. And there is no magical fixup that can be done
at load time ... it is just an error that must be reported.

Cheers,
Geoff

On 12/10/2010 4:53 AM, colinc wrote:
wmansurwrote:
I think your idea has some merit and development teams would be wise
to adopt something like it. Of course, teams can adopt all sorts of
"ground rules". However, doing so does not prevent such
issues as you have described, at least not 100%. Read on for an
interesting situation involving 2 files with the same name that
happened to us about a year ago. Maybe this can be of help to you in
your situation.

OK. Unfortunately, some people are saying that Camel Case naming
conventions have worked just fine up until now (even though we know
that's just an accident waiting to happen if you are on Windows).

wmansurwrote:
We found out that it is possible to have 2 files with the same name,
except for the case of the file name, exist in the same folder in RTC
(in Windows)... I believe that this is also known as an "Evil
Twin" situation.

Wow, Evil Twins! Thanks for mentioning this because it lead me to read
the IBM article About Evil Twins...
http://www-01.ibm.com/support/docview.wss?uid=swg21125072

permanent link
David Olsen (5237) | answered Dec 11 '10, 2:38 a.m.
JAZZ DEVELOPER
On 2010/12/10 2:23, colinc wrote:
Based on a very small sample size, this comment appears to suggest
that file name handling in the RTC client is fundamentally broken for
teams distributed between Windows and Linux users. Is this really
true, or am I missing something?

My guess is that you are missing something. But that's just a guess.
On teams that I have worked with over the last several years, the
developers usually work on Windows but the builds run on Linux. I don't
recall any problems with case sensitivity. (The usual platform problems
are line ending differences and platform-specific build scripts.) I
think we have avoided case sensitivity problems in file names by:
1. Never create two files that differ only in case.
2. When on Windows only use tools that preserve case. (So if you create
a file as Foo.txt, all tools will leave it as Foo.txt and not try to
change it to FOO.TXT.)

I think the statement that "the RTC client is fundamentally broken for
teams distributed between Windows and Linux" is much too strong. I am
quite happy with RTC's cross platform behavior.

permanent link
Colin Coates (9121) | answered Dec 11 '10, 3:32 a.m.
I think the statement that "the RTC client is fundamentally broken for
teams distributed between Windows and Linux" is much too strong. I am
quite happy with RTC's cross platform behavior.


Yes, I agree that my comment was far too strong. I was feeling quite frustrated at the time. Sorry about that.

I think that the message is quite clear... if you want to avoid problems with moving files/directories between Windows and Linux, the best defence is a naming convention based on the lowest common denominator (i.e. Windows' case insensitve file naming). Maybe the convention should be backed up by a small tool that scans directories to ensure the naming convention is being consistently applied.

It might be good if RTC was enhanced to check and warn about file names that could provide problems due to case senstivity. On the other hand, it can be regarded as a feature rather than a problem.

Thanks to everyone who took the timet to post answers to my questions... its been really informative!

permanent link
Walter Mansur (63613017) | answered Dec 13 '10, 9:42 a.m.
I would also say that the statement "the RTC client is fundamentally broken for teams distributed between Windows and Linux" is much too strong. We don't mix *NIX and Windows here, but many places do and RTC appears to be well suited for that type of environment.

Regarding Geoff's earlier reply regarding "Evil Twins". He is correct about what constitutes an "Evil Twin". However the developers here only know about what they see here. If they see two files with the same name in a folder, to them that is an "evil twin". How it got there is of no concern to them. They used to use Source Safe and according to them, that tool handled this type situation. Or to better rephrase it, maybe the Windows Operating System handled it for Source Safe. As I explained, earlier we were able to resolve this particular issue and we know what to do if this happens again. This is considered a good thing.

To prevent something like this from happening again for us we do what David Olsen suggested in #1 of his earlier reply. That works for us (of course, until the next time someone delivers a file with the same name except for case). However, thanks to the IBM RTC development team we know how to deal with such a situation. #2 in David's reply is also a good practice to follow. I believe that the COBOL developers here have looked into that and have adjusted their settings accordingly. The fact that this hasn't happened for almost a year now almost makes me certain that this is the case (no pun intended).

- Walter

I think the statement that "the RTC client is fundamentally broken for
teams distributed between Windows and Linux" is much too strong. I am
quite happy with RTC's cross platform behavior.


Yes, I agree that my comment was far too strong. I was feeling quite frustrated at the time. Sorry about that.

I think that the message is quite clear... if you want to avoid problems with moving files/directories between Windows and Linux, the best defence is a naming convention based on the lowest common denominator (i.e. Windows' case insensitve file naming). Maybe the convention should be backed up by a small tool that scans directories to ensure the naming convention is being consistently applied.

It might be good if RTC was enhanced to check and warn about file names that could provide problems due to case senstivity. On the other hand, it can be regarded as a feature rather than a problem.

Thanks to everyone who took the timet to post answers to my questions... its been really informative!

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.