You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stephen Butler <sb...@elego.de> on 2010/07/22 06:49:27 UTC

Re: BUG: when performing a checkout use the cased url as in the download URL

On Jul 22, 2010, at 7:10 , dave b wrote:

> On 22 July 2010 05:47, Bob Archer <Bo...@amsi.com> wrote:
>> 
>>> On 22 July 2010 03:12, dave b <db...@gmail.com> wrote:
>>>> On 22 July 2010 02:58, Bolstridge, Andrew
>>>> <an...@intergraph.com> wrote:
>>>>>> -----Original Message-----
>>>>>> excuse to say "we told you so".
>> "NTFS supports two slightly different modes of operation that can be selected by the subsystem of the application interacting with NTFS. The first is fully case sensitive and demands that file names supplied by the application match the names stored on disk including case if the file on disk is to be selected. The second mode of operation is case preserving but not case sensitive. This means that applications can select files on the disk even if the supplied name differs in case from the name stored on the disk. Note that both modes preserve the case used to create the files. The difference in behavior noted here applies only when an application needs to locate an existing file. POSIX takes advantage of the full case sensitive mode, while MS-DOS, WOW, and Win32 subsystems use the case insensitive mode."
>> 
>> http://support.microsoft.com/kb/100625
>> 
>> I expect subversion runs within the Win32 subsystem and use the case insensitive mode.
> 
> I am not sure. However, if you do a checkout and if there would be a
> conflict (which you can test for / check), then svn could potentially
> handle it differently to how it does currently iff the program / user
> wanted that :)
> 

When developing cross-platform software, we recommend that the
Subversion admin install a hook script to enforce conventions such
as "no paths that differ only in case".  There's a sample hook script
for just this purpose at

  http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py

Regards,
Steve

--
Stephen Butler | Senior Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194


Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by dave b <db...@gmail.com>.
On 22 July 2010 23:59, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: Matthew Bentham [mailto:mjb67@artvps.com]
>> Sent: donderdag 22 juli 2010 15:32
>> To: stsp@stsp.name
>> Cc: dave b; Stephen Butler; Bob Archer; Bolstridge, Andrew;
>> dev@subversion.apache.org
>> Subject: Re: BUG: when performing a checkout use the cased url as in
>> the download URL
>>
>> On 22/07/2010 14:08, stsp@stsp.name wrote:
>> > On Thu, Jul 22, 2010 at 10:58:44PM +1000, dave b wrote:
>> >> Can we at least agree that the current state is suboptimal ?
>> Something like:
>>
>> "svn.exe: Foo.txt obstructed by foo.txt.  Skipping Foo.txt".
>
> Currently in Subversion 1.6 the working copy can't handle files/directories
> that only differ by casing as our administrative area uses the same names.
>
> For Subversion 1.7 (with the new working copy library) something like this
> suggestion is planned. (The actual planned behavior is that you get an
> obstruction conflict)

Sounds good :)

RE: BUG: when performing a checkout use the cased url as in the download URL

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Matthew Bentham [mailto:mjb67@artvps.com]
> Sent: donderdag 22 juli 2010 15:32
> To: stsp@stsp.name
> Cc: dave b; Stephen Butler; Bob Archer; Bolstridge, Andrew;
> dev@subversion.apache.org
> Subject: Re: BUG: when performing a checkout use the cased url as in
> the download URL
> 
> On 22/07/2010 14:08, stsp@stsp.name wrote:
> > On Thu, Jul 22, 2010 at 10:58:44PM +1000, dave b wrote:
> >> Can we at least agree that the current state is suboptimal ?
> >
> > Sure, but it's the state of windows that is suboptimal.
> > There simply isn't anything we can reasonably do about it.
> >
> > Stefan
> >
> 
> What if svn.exe (or TortoiseSVN) could issue a warning that the checked
> out copy did not represent the repository?  Then at least the user
> would
> know about it and could change their repository.
> 
> Something like:
> 
> "svn.exe: Foo.txt obstructed by foo.txt.  Skipping Foo.txt".

Currently in Subversion 1.6 the working copy can't handle files/directories
that only differ by casing as our administrative area uses the same names.

For Subversion 1.7 (with the new working copy library) something like this
suggestion is planned. (The actual planned behavior is that you get an
obstruction conflict)

	Bert


Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by Matthew Bentham <mj...@artvps.com>.
On 22/07/2010 14:08, stsp@stsp.name wrote:
> On Thu, Jul 22, 2010 at 10:58:44PM +1000, dave b wrote:
>> Can we at least agree that the current state is suboptimal ?
>
> Sure, but it's the state of windows that is suboptimal.
> There simply isn't anything we can reasonably do about it.
>
> Stefan
>

What if svn.exe (or TortoiseSVN) could issue a warning that the checked 
out copy did not represent the repository?  Then at least the user would 
know about it and could change their repository.

Something like:

"svn.exe: Foo.txt obstructed by foo.txt.  Skipping Foo.txt".

At the moment the checkout/update code will not recognise that the file 
being added is overwriting a different file from the same checkout.

I'd like to add that this situation doesn't just arise with 
cross-platform development.  You don't need Linux to create a repository 
that won't check out correctly on Windows.  A couple of weeks ago a new 
user at work decided to standardise the capitalisation of some files, 
and did so by renaming the file in the wc, then Adding the file using 
TortoiseSVN, then committing.

After that, every checkout or update of that directory would cause there 
to be a file with one of the two names, and the contents of the other 
file.  On a 'status' the situation would show up as a local modification 
of the file in the wc, and the other file as Missing.

Even knowing about these problems it took me a little while to realise 
what had happened.  I suspect that it doesn't matter that my svn server 
is linux: I'm sure that the broken situation could have been achieved on 
a Windows server with a Windows client.

I'm with everybody else that it doesn't make sense for svn to try to 
make it 'work', even cygwin doesn't try to gloss over this issue.

Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by dave b <db...@gmail.com>.
On 22 July 2010 23:08, Stefan Sperling <st...@elego.de> wrote:
> On Thu, Jul 22, 2010 at 10:58:44PM +1000, dave b wrote:
>> Can we at least agree that the current state is suboptimal ?
>
> Sure, but it's the state of windows that is suboptimal.
> There simply isn't anything we can reasonably do about it.
>
> Stefan
>
I have outlined what behaviour I would expect as a user in the
original email I sent to this list.
Windows isn't the only place that this can happen. If you had a
network mounted dir - where svn lived and the method of access was
only case insensitive the same issue would occur on linux :)

By doing nothing you gain nothing. By having a method to say "ok but
lets handle this like this and inform the user" --> via a new method /
api , there is much to be gained. Nothing will be lost.

--
Tempt not a desperate man.		-- William Shakespeare, "Romeo and Juliet"

Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jul 22, 2010 at 10:58:44PM +1000, dave b wrote:
> Can we at least agree that the current state is suboptimal ?

Sure, but it's the state of windows that is suboptimal.
There simply isn't anything we can reasonably do about it.

Stefan

Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by dave b <db...@gmail.com>.
On 22 July 2010 19:55, Stefan Sperling <st...@elego.de> wrote:
> On Thu, Jul 22, 2010 at 05:10:01PM +1000, dave b wrote:
>> Perhaps if it is possible, svn on windows can use the posix api? - I
>> don't know how that works :)
> http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX#cite_note-6
> -> http://technet.microsoft.com/en-us/library/bb496994.aspx
>  "Case-sensitivity of the directory and file names is an optional choice
>   and can be selected by the user during the installation of Windows
>   Services for UNIX 3.5."
>
> So we'd also need to write detailed documentation telling people how
> they can enable the new and shiny case-sensitive filenames with Subversion
> on Windows, and then manage complaints about where things fail to work as
> expected and document all the corner-cases (especially regarding interaction
> with other applications).
>
> So, sorry, but this is just not worth supporting. It's more trouble
> than it is worth.
So atm it doesn't even work? Can we at least agree that the current
state is suboptimal ? - svn don't even work in the use cases I
described.

Something _must_ be *better* than _nothing_.

Ok so that posix stuff on windows isn't possible. What about a
portable fix based around the behaviour I described in windows - that
can be applied after testing the filesystem :) ?

If you haven't noticed I have been saying and or suggesting that svn
only does this _in_ new methods / api.

--
Kiss me, Kate, we will be married o' Sunday.		-- William Shakespeare,
"The Taming of the Shrew"

Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jul 22, 2010 at 05:10:01PM +1000, dave b wrote:
> Perhaps if it is possible, svn on windows can use the posix api? - I
> don't know how that works :)

It doesn't work quite like that. Subversion uses APR (the apache
portable runtime) for portability. This means that file i/o, memory
handling, network access etc. is abstracted by APR. This means that,
to Subversion, every operating system looks the same. It also means
that Subversion can run on any platform supported by APR.

Now, we make exceptions to this in certain places, and call win32 APIs
directly. But to the best of my knowledge we only do so to work around
severe problems. For instance, we try to work around "access denied"
errors that happen when other applications have a file open which Subversion
wants to rename or delete -- another "feature" of Windows that would
otherwise cause Subversion to error out whenever the virus scanner
opens a working copy.

> The microsoft article linked a few mails back by Bob Archer states
> that using the posix api it is possible to have cased file-names and
> access.

It's likely that other applications that work with Subversion
on Windows would get confused if we did this. Other applications won't
be prepared to handle the files Subversion creates like this.

For instance, many Windows users run Subversion inside of Eclipse.
Eclipse will most likely not be prepared to handle these files after
Subversion creates them. And what about build systems people use?
And merge tools? And helper scripts?

Like windows application developers, most windows users also have
gotten used to the limitation and would not expect Subversion to treat
filenames differently than all the other applications on their system.
A hopefully unnecessary reminder is that most software people use on
Windows is proprietary which means they are relying on commercial
vendors to address issues like interoperability with Subversion.
So there is a lot of software that people cannot change to work with
case-sensitive filenames even if they wanted to. So what's the point
of Subversion doing it? It will be the odd one out, so most people would
rather live with case-insensitive filenames for reason of interoperability.

Also, it's not just a matter of adding code to Subversion.
Apparently the user has to install an optional component and make
a concious choice during installation of that component to make the
API work case-sensitively. That's another two big hurdles right there.

http://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem says:
   "Starting with Windows XP, the POSIX subsystem is not included as part
    of standard Windows distributions and has been replaced by Interix.[2]"

Following the Interix link, we find:
http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX#cite_note-6
-> http://technet.microsoft.com/en-us/library/bb496994.aspx
  "Case-sensitivity of the directory and file names is an optional choice
   and can be selected by the user during the installation of Windows
   Services for UNIX 3.5."

So we'd also need to write detailed documentation telling people how
they can enable the new and shiny case-sensitive filenames with Subversion
on Windows, and then manage complaints about where things fail to work as
expected and document all the corner-cases (especially regarding interaction
with other applications).

So, sorry, but this is just not worth supporting. It's more trouble
than it is worth.

Stefan

Re: BUG: when performing a checkout use the cased url as in the download URL

Posted by dave b <db...@gmail.com>.
On 22 July 2010 16:49, Stephen Butler <sb...@elego.de> wrote:
>
> On Jul 22, 2010, at 7:10 , dave b wrote:
>
>> On 22 July 2010 05:47, Bob Archer <Bo...@amsi.com> wrote:
>>>
>>>> On 22 July 2010 03:12, dave b <db...@gmail.com> wrote:
>>>>> On 22 July 2010 02:58, Bolstridge, Andrew
>>>>> <an...@intergraph.com> wrote:
>>>>>>> -----Original Message-----
>>>>>>> excuse to say "we told you so".
>>> "NTFS supports two slightly different modes of operation that can be selected by the subsystem of the application interacting with NTFS. The first is fully case sensitive and demands that file names supplied by the application match the names stored on disk including case if the file on disk is to be selected. The second mode of operation is case preserving but not case sensitive. This means that applications can select files on the disk even if the supplied name differs in case from the name stored on the disk. Note that both modes preserve the case used to create the files. The difference in behavior noted here applies only when an application needs to locate an existing file. POSIX takes advantage of the full case sensitive mode, while MS-DOS, WOW, and Win32 subsystems use the case insensitive mode."
>>>
>>> http://support.microsoft.com/kb/100625
>>>
>>> I expect subversion runs within the Win32 subsystem and use the case insensitive mode.
>>
>> I am not sure. However, if you do a checkout and if there would be a
>> conflict (which you can test for / check), then svn could potentially
>> handle it differently to how it does currently iff the program / user
>> wanted that :)
>>
>
> When developing cross-platform software, we recommend that the
> Subversion admin install a hook script to enforce conventions such
> as "no paths that differ only in case".  There's a sample hook script
> for just this purpose at
>
>  http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py

That looks ok. However, this doesn't solve existing or future
repositories  - unless this is applied by default or the default
triggers  a warning :)

Perhaps if it is possible, svn on windows can use the posix api? - I
don't know how that works :)
The microsoft article linked a few mails back by Bob Archer states
that using the posix api it is possible to have cased file-names and
access.

--
O, it is excellentTo have a giant's strength; but it is tyrannousTo
use it like a giant.		-- Shakespeare, "Measure for Measure", II, 2