Check out to FAT changes case of a file.

View: New views
3 Messages — Rating Filter:   Alert me  

Check out to FAT changes case of a file.

by Kevin Grover-2 :: Rate this Message:

| View Threaded | Show Only this Message

I have a strange thing happen.

Subversion 1.5.4 (Ubuntu 9.04)

On FAT under Linux, If I checkout a WC with a directory that is in all uppercase, it changes the case to lowercase.  However, if I check the same directory out to an ext3 file system, the case is correct. (Or if I do the check out under Windows)

for Example:

$ svn co file:///media/truecrypt1/repos/svn/notes/trunk notes
...
A    notes/Publications
A    notes/Publications/ISRI
A    notes/Publications/ISRI/AR-93.pdf
...

$ svn st notes
?      notes/Publications/isri
!      notes/Publications/ISRI


However, it all works as expected when I run it from a Windows machine.  I played around with the directory and I can rename it to mixed case 'IsRi' etc, but if I use a 'mv isri i; mv i ISRI; ls'  I see 'isri'.

Anyway,  I know FAT is case sensitive (hence the temp file in the rename example in the last paragraph), but I though it was case preserving.  It there something I'm missing about FAT under Linux or is this the expected behavior?


Re: Check out to FAT changes case of a file.

by B Smith-Mannschott :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, Sep 8, 2009 at 02:02, Kevin Grover<kevin@...> wrote:

> I have a strange thing happen.
>
> Subversion 1.5.4 (Ubuntu 9.04)
>
> On FAT under Linux, If I checkout a WC with a directory that is in all
> uppercase, it changes the case to lowercase.  However, if I check the same
> directory out to an ext3 file system, the case is correct. (Or if I do the
> check out under Windows)
>
> for Example:
>
> $ svn co file:///media/truecrypt1/repos/svn/notes/trunk notes
> ...
> A    notes/Publications
> A    notes/Publications/ISRI
> A    notes/Publications/ISRI/AR-93.pdf
> ...
>
> $ svn st notes
> ?      notes/Publications/isri
> !      notes/Publications/ISRI
>
>
> However, it all works as expected when I run it from a Windows machine.  I
> played around with the directory and I can rename it to mixed case 'IsRi'
> etc, but if I use a 'mv isri i; mv i ISRI; ls'  I see 'isri'.
>
> Anyway,  I know FAT is case sensitive (hence the temp file in the rename
> example in the last paragraph), but I though it was case preserving.  It
> there something I'm missing about FAT under Linux or is this the expected
> behavior?

FAT is odd WRT its handling of case in file names. Classic 8.3 file
names are case *in*sensitive and case clobbering. The directory table
stores only upper-case. To this day files with especially short names
on windows (XP) will spontaneously upper-case themselves for this
reason.

Presumably, the linux FAT implementation chose to present such case
clobbered files in lower case, since the case information is lost in
any case and lowercase is a more common convention on *nix systems,
but I'm just guessing.

FAT with long file name support. (e.g. FAT32) is case *in*senstive,
but case preserving.

http://en.wikipedia.org/wiki/File_Allocation_Table

// Ben

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2392290

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

Re: Check out to FAT changes case of a file.

by Kurt Pruenner :: Rate this Message:

| View Threaded | Show Only this Message

Kevin Grover wrote:
> Anyway,  I know FAT is case sensitive (hence the temp file in the rename
> example in the last paragraph), but I though it was case preserving.  It
> there something I'm missing about FAT under Linux or is this the
> expected behavior?

I think you mean it's case insensitive...

Anyway - having a look at "man mount":

[...]
| Mount options for vfat
[...]
|        shortname=[lower|win95|winnt|mixed]
|
|               Defines  the  behaviour  for  creation  and display of
|               filenames which fit into 8.3  characters.  If  a  long
|               name  for  a  file exists, it will always be preferred
|               display. There are four modes:
|
|               lower  Force the short name to lower  case  upon  dis-
|                      play;  store a long name when the short name is
|                      not all upper case.
|
|               win95  Force the short name to upper  case  upon  dis-
|                      play;  store a long name when the short name is
|                      not all upper case.
|
|               winnt  Display the shortname as is; store a long  name
|                      when  the  short  name is not all lower case or
|                      all upper case.
|
|               mixed  Display the short name as is; store a long name
|                      when the short name is not all upper case.
|
|        The default is "lower".

I guess you actually want "mixed" instead of "lower"...

--
Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
.......It might be written "Mindfuck", but it's spelt "L-A-I-N".......

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2392297

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].