You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tristan Seligmann <tr...@quotemaster.co.za> on 2003/10/07 09:21:44 UTC

Case-insensitivity causes data loss under win32

Subversion (correctly) does not consider 'FILENAME' to be equivalent to 
'filename', even under win32 where they are equivalent on the 
filesystem. The problem is: if you rename (local rename, not svn rename) 
a working copy of a file 'filename' to 'FILENAME', and then do svn 
update, 'FILENAME' will be "silently" overwritten with the clean copy of 
'filename'. For example:

---

 >svn status xcom.prg

 >echo blah > xcom.prg

 >svn status xcom.prg
M      xcom.prg

 >move xcom.prg XCOM.PRG

 >svn update
Restored xcom.prg
At revision 1933.

 >svn status xcom.prg

---

Would it be possible for some kind of warning to be displayed under 
these circumstances, to avoid the data loss? (The reason the filenames 
are changing case is that they're being edited with DOS apps...)

Also, can anyone suggest a workaround other than renaming every file in 
the repository to uppercase?

Tristan Seligmann


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by Jan Hendrik <ja...@bigfoot.com>.
Concerning Re: Case-insensitivity causes data 
Christopher Baus wrote on 10 Oct 2003, 14:39, at least in part:

> NTFS actually is case sensitive it just that most of
> the windows APIs in the presentation layer happily
> ignore this.  The case sensitivity issue has already
> bitten once in the short time I've been using svn.  I
> added files with the same name, but different
> sensitivity, from Unix and checked them out under
> Windows.  Bam, weird errors, co fails.  

Why not give SVN a switch as most FTP apps (at least for 
Windows) have? ON = change all filenames to lowercase; OFF = 
leave filenames as they are (this as default). That way pure UNIX 
environments have nothing to change (or can make their life easier, 
too, as setting it on keeps them from getting files twice and more 
because of misspelling or not sticking to personal conventions), 
while all mixed and pure Windows environments get a safe setting.

Jan Hendrik

---------------------------------------
Freedom quote:

     ... the question becomes,
     are you going to have everyone play by the same rules,
     or are you going to try to rectify the shortcomings,
     errors and failures of the entire cosmos?
     Because those things are wholly incompatible.
     If you're going to have people play by the same rules,
     that can be enforced with a minimum amount
     of interference with people's freedom.
     But if you're going to try to make the entire cosmos right and just,
     somebody has got to have an awful lot of power
     to impose what they think is right on an awful lot of other people.
     What we've seen, particularly in the 20th century,
     is that putting that much power in anyone's hands is enormously dangerous.
                -- Thomas Sowell, 1999


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by Christopher Baus <ch...@yahoo.com>.
> 
> I expect that this way lies a nasty mess of
> surprises. It's not the OS
> that is case-sensitive/preserving, it's the file
> system. If you use
> SAMBA to (e.g.) mount an NTFS drive on a UNIX box,
> what's the case
> there? Similarly, what happens when you mount a case
> sensitive file
> system on to Windows?
> 
> Greg

NTFS actually is case sensitive it just that most of
the windows APIs in the presentation layer happily
ignore this.  The case sensitivity issue has already
bitten once in the short time I've been using svn.  I
added files with the same name, but different
sensitivity, from Unix and checked them out under
Windows.  Bam, weird errors, co fails.  

<RANT>
While NTFS is a modern file system, in practice the
Windows file system is a hopeless pile of crap.  
</RANT>

I feel better now.

Christopher

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by Greg Thomas <Gr...@TheThomasHome.co.uk>.
On Tue, 7 Oct 2003 16:27:49 +0200, "SteveKing" <st...@gmx.ch>
wrote:

> Since Windows has
> a filesystem which is case-insensitive Subversion should just compare
> those path-strings case-insensitive on such OSes.

I expect that this way lies a nasty mess of surprises. It's not the OS
that is case-sensitive/preserving, it's the file system. If you use
SAMBA to (e.g.) mount an NTFS drive on a UNIX box, what's the case
there? Similarly, what happens when you mount a case sensitive file
system on to Windows?

Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Case-insensitivity causes data loss under win32

Posted by John Peacock <jp...@rowman.com>.
SteveKing wrote:
>> > Don't use DOS apps???  Don't use Win32 and use a proper O/S??? <ducks>
> 
> 
> Ok, don't use Win32 is a really bad advice. 

The <ducks> was specifically there to divert such criticism. ;~)

I also work in an office that is infected with M$loth products; I want to 
switch, but cannot.  However, I think that at this point in time, anyone using 
DOS apps gets what they deserve.  There isn't a single DOS app that cannot be 
replaced by a much more capable program (try Cygwin for example).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by SteveKing <st...@gmx.ch>.
----- Original Message ----- 
From: "Tristan Seligmann" <tr...@quotemaster.co.za>

>  > I would think that this would vastly slow down processing, because
every
>  > time svn finds a file missing, it would have to then look again for an
>  > uppercase representation.
>
> I suppose. I hadn't considered the performance issues; if this is the
> case, then clearly such a check would be unacceptable.

I think that performance issue is not so bad at all. Since Windows has
a filesystem which is case-insensitive Subversion should just compare
those path-strings case-insensitive on such OSes.
And I think performance isn't as important as _not_ loosing any data.

>  > Don't use DOS apps???  Don't use Win32 and use a proper O/S??? <ducks>

Ok, don't use Win32 is a really bad advice. Or do you come to our office and
talk to our boss about switching OS? Would you succeed? Oh and don't forget:
all our development tools (compilers for Microprozessors, DSP's, ...) must
also
run under that other OS.
If you can do that then I'll gladly take your advice and switch to another
OS.

> I've run into the situation where MSVS.NET renames "resource.h" to
> "Resource.h" (or is it the other way around? I forget.). This caused some
> svn difficulties

Yes it does. I ran into the same problem and lost a whole bunch of data
because
of that...

Also, under Win2k there's a setting in the explorer to force filenames to be
created with a starting uppercase letter. So if you ever click twice (not a
doubleclick!)
on a file the explorer goes into "renaming mode". If you now just hit escape
to _not_
rename the file at all then explorer still changes the filename to a
starting uppercase
letter.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by Tristan Seligmann <tr...@quotemaster.co.za>.
John Peacock wrote:

 > At this point "xcom.prg" is considered missing; do an 'svn status' at
 > this point and see if you see that (and that XCOM.PRG show up with a
 > question mark).

Correct:

 >svn status
?      XCOM.PRG

 > I would think that this would vastly slow down processing, because every
 > time svn finds a file missing, it would have to then look again for an
 > uppercase representation.

I suppose. I hadn't considered the performance issues; if this is the 
case, then clearly such a check would be unacceptable.

 > Don't use DOS apps???  Don't use Win32 and use a proper O/S??? <ducks>

I wish. Well, we're heading in that direction, but I need a more 
immediate solution for the time being.

Thanks,

Tristan Seligmann


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Case-insensitivity causes data loss under win32

Posted by John Peacock <jp...@rowman.com>.
Tristan Seligmann wrote:
>  >svn status xcom.prg
> 
>  >echo blah > xcom.prg
> 
>  >svn status xcom.prg
> M      xcom.prg
> 
>  >move xcom.prg XCOM.PRG

At this point "xcom.prg" is considered missing; do an 'svn status' at this point 
and see if you see that (and that XCOM.PRG show up with a question mark).

> 
>  >svn update
> Restored xcom.prg
> At revision 1933.

Since xcom.prg was missing, svn "helpfully" restores it (from the textbase???).

> Would it be possible for some kind of warning to be displayed under 
> these circumstances, to avoid the data loss? (The reason the filenames 
> are changing case is that they're being edited with DOS apps...)

I would think that this would vastly slow down processing, because every time 
svn finds a file missing, it would have to then look again for an uppercase 
representation.

> 
> Also, can anyone suggest a workaround other than renaming every file in 
> the repository to uppercase?

Don't use DOS apps???  Don't use Win32 and use a proper O/S??? <ducks>

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org