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

Re: Case-only renames on Windows (issue #3702)

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 24 Mar 2011 14:22:04 +0000

Johan Corveleyn <jcorvel_at_gmail.com> writes:

> I'm looking at issue #3702 ("svn ren TODO todo" not work on windows).

It's a bit tricky :) Consider a mixed-case node "Foo". It's seems
obvious that

   svn mv Foo foo

is a case-only rename. But what about

   svn mv FOO foo

or
   svn mv foo foo

It's possible to do a case-only rename whenever the destination doesn't
match the disk, but should we require the source to match?

The node "Foo" might contain a child "Zig", is

   svn mv Foo/Zig foo/Zig

a case-only rename? If that is a case-only rename what about

   svn mv Foo/Zig foo/zig

is that two renames? Suppose there are two children "Zig" and "Zag",
if

   svn mv Foo/Zig foo/Zig

is a case-only rename it would affect "Foo/Zag".

A set of rules:

 - only the last component can be a case-only rename
 - the source must match the "real" case on disk
 - the destination must differ from the source

would allow users to do case-only renames, and would have the advantage
that the behaviour would be similar to most case-sensitive filesystems.

I'm not exactly sure how canonicalisation works on Windows, does it
allow us to identify the "real" case on disk? If not then perhaps just
the first and last of the above two rules would be enough?

How about the following: the application does canonicalization on the
two paths, and compares the canonical paths. If the paths match it
passes the original paths into some libsvn_client function that
implements the above rules. That would give all Windows clients an easy
way to get some sort of "standard" behaviour.

-- 
Philip
Received on 2011-03-24 15:26:34 CET

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.