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

Re: [PATCH] First step for issue #3702 (case-only renames on Windows) - now blocked by libsvn_client

From: Branko Čibej <brane_at_e-reka.si>
Date: Sat, 16 Apr 2011 13:41:06 +0200

On 16.04.2011 10:17, Johan Corveleyn wrote:
> Hi,
>
> Following discussion in [1], I tried to write a patch for issue #3702
> ("svn ren TODO todo" not work on windows). As mentioned by Bert in
> comment to the issue [2], we need to avoid letting 'svn move' convert
> the destination path to on-disk casing in this case, so that's what
> the below patch does.
[...]

Your biggest headache is going to be dealing with the fact that the WC
database is case-sensitive, as in, for example:

    svn mv foo foo

where the file on disk (and in the database) is actually called Foo. The
above operation is perfectly valid on case-insensitive file systems. The
other case is where neither the source nor the destination name of the
rename match the name case in wc-db.

N.B.: You are absolutely not allowed to do a case-insensitive comparison
of file names anywhere. You must let the filesystem decide if Foo and
fOO refer to the same file. This is because the file system can (and
often will) have different ideas about case folding than the current
locale does. This implies that, if you "svn mv foo foo", and the file on
disk is "fOO" but the entry in the wc-db is "Foo", you have to scan the
directory in wc-db and check if the truename of any of those entries
matches the truename of the rename source. This is not very optimal at
all, but I don't see any other sure way of getting correct results.

-- Brane
Received on 2011-04-16 13:41:44 CEST

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.