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

Re: [RFC] Final approach for issue #3702 (case-only renames on Windows)?

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Wed, 25 May 2011 10:53:47 +0200

On Wed, May 25, 2011 at 10:31 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Branko Čibej wrote on Wed, May 25, 2011 at 08:34:37 +0200:
>> On 25.05.2011 06:34, Ivan Zhakov wrote:
>> > On Wed, May 25, 2011 at 03:00, Bert Huijben <bert_at_qqmail.nl> wrote:
>> >>> 2011/5/24 Branko Čibej <brane_at_e-reka.si>:
>> >>>> On 24.05.2011 11:02, Johan Corveleyn wrote:
>> >>>> [...]
>> > I'm fully agree with Bert that moving truepath conversion to
>> > libsvn_client as bad idea and would introduct gigantic slowdown for
>> > some Windows clients.
>>
>> Hmm ... I have a hard time imagining why this conversion would be so
>> expensive, but I'll take your word for it. There is of course another
>> option ... the exact opposite in fact: to take the truepath conversion
>> _out_ of libsvn_client. :) But then you'd have to require every client
>> to tweak the target array exactly right for each command.
>>
>> I don't like the is_move idea; it's too hacky, and too specific to one
>> single use case. Perhaps the target array could be changed to contain
>> both "given name" and "true name", but that would require rev'ing most
>> of the libsvn_client API, which sounds even worse ... sigh.
>>
>
> Or we could make the helper API return an array of truepaths and an
> array of non-trupath'd paths, so that most callers can just pass the
> first one (unmodified) to libsvn_client?

Yes, that was actually option 2 from my original mail:

> 2) Rev svn_client_args_to_target_array to simple always return the
> original target list, as well as the truepath converted ones. Then let
> move_cmd.c figure it out (i.e. implement the above logic).

I think that's also acceptable (the helper function already has those
original paths, so it doesn't cost anything to also return them (well,
it does have a slight cost if they need to be canonicalized (slashes
and such) without truepath-ing, but maybe that's not necessarily
required here -- might be done by the caller afterwards when it needs
to use them).

All users of this function (AFAIU, only command line subcommands use
this), except for "move", would then just ignore the "original
paths", using the truepaths like they do now. Only move will use the
original paths array to get the original destination of the move (only
in case of a real move, so len==2, and then only if src_truepath ==
dest_truepath).

So that's simply returning more information from the helper function,
so any client needing access to the original paths can simply do
whatever it needs to do...

-- 
Johan
Received on 2011-05-25 10:54:39 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.