[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Case sensitivity (was: Re: A List of Issues)

From: William Uther <will+_at_cs.cmu.edu>
Date: 2002-06-06 18:08:25 CEST

On 6/6/02 1:16 AM, "Bill Tutt" <rassilon@lyra.org> wrote:

>
>> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
>>
>>> - Case SeNsitiVity
>>
>> I see the problem, but I'm not sure where to start on solutions.
>> Should the client just force downcase all paths on Windows?
>
> No, that's wrong. Windows (and Mac OS 9, dunno about the new Darwin
> stuff, Fitz can comment) file systems are case insensitive but case
> preserving.

With Mac OS X/Darwin it is a function of the file system in use, not the OS.
The default file system on these systems is HFS+. This is case insensitive
but case preserving.

I managed to reproduce Jay's problem on Mac OS X and added the recipe to
issue 667.

>> It's
>> clearly not enough to depend on APR-under-Windows being properly case
>> insensitive -- APR does fine, but we still have the original-case
>> path, and we're storing it that way in Berkeley DB.
>>
>> Ick. Maybe there's some nice trick I'm not thinking of?
>>
>
> Personally, I think people who get too upset about case sensitivity are
> the people who need to be using GUI front ends to source code management
> systems.

I don't think the client/UI has much to do with it. If I have a file
"myfile" and I want to change it to "myFile" I'd do the equivalent of "svn
mv myfile myFile" whatever the UI. This currently fails. See issue 667.

> Besides, cmd.exe has tab completion, use that for specifying files. It's
> not like we're going to make URLs on the server case-insensitive or
> anything.

I don't think you want the server to worry about this. But I think this is
an issue for the working copy library, not just the client.

Here are my first thoughts on a solution.

 - The case in the repository is canonical. When looking for a file in the
wc, the client resolves the file and then checks its case (no idea how to do
this right across various platforms). If the case is wrong then the working
copy errors.

For example:
$ svnadmin create test
$ svn co file://PathTo./test -d repos
Checked out revision 0.
$ cd repos
$ touch myFile
$ svn add myfile
  leads to an error - the files cases don't match.
$ svn add myFile
$ svn commit -m ""
$ mv myFile myfile
$ svn up
  leads to an error - obstructed update. myfile exists when trying to
create myFile.

Note that issue 667 still needs to be fixed - you need to be able to use
"svn mv" to change the case of a file.

This might still have problems in two situations:
  - There are two files in a directory in the repository that only differ in
case. It is not possible to store such a pair of files in a single dir on
Mac OS X. I think that svn should error on checkout/update explaining the
situation. A client could be written to detect the error and ask the user
to "svn mv URL" one of the files to resolve the conflict.
  - The filesystem is not even case preserving. In this case I think you
need to tell svn and have it ignore case. Maybe a client option to convert
all files to a single case. This would still have to error if there were
multiple files in a single dir differing only in case.

What do people think?

\x/ill :-}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 6 18:09:11 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.