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

Re: [PATCH] remove unused parameter from libsvn_client/copy.c:setup_copy()

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Sat, 26 Jul 2008 23:49:00 +0100

On Sat, 2008-07-26 at 18:03 +0200, Stefan Sperling wrote:
> Good news everyone,
>
> libsvn_subr/copy.c:setup_copy() takes a parameter named 'force'
> which was used in 1.4.x but is not used anymore in 1.5.x and
> trunk.

Yay!

It looks like the behaviour change to stop using it was intentional, per
r21347, "Don't require --force to move dirs with unversioned files or
local mods."

> svn_client_move5 still exposes this parameter in public API.
> The API docs in trunk say the following and I think they're wrong
> because, well, force is ignored:
>
> * - If one of @a src_paths contains locally modified and/or unversioned
> * items and @a force is not set, the move will fail. If @a force is set
> * such items will be removed.
>
> The above should probably be replaced by a description of the
> current behaviour (which I have not had time to figure out yet).

I presume it is intended to move the unversioned files and the local
mods. It would be quite horrible if it were now to delete them.

> Rev'ing svn_client_move5 for this is overkill.
> I'd suggest adding a comment to the docs of svn_client_move5 stating
> that if the function is rev'd again for any reason, the force parameter
> could/should be dropped.

+1.

> For starters, here's a patch that removes the force parameter
> from setup_copy. OK to commit?

Not sure.

Strictly speaking, we should preserve the behaviour options for the
existing APIs. The previous behaviours were well documented and thus
something that third-party tools may well have been relying on. While we
could argue that we have just "improved" the behaviour, I am not sure
that we always pay enough attention to meeting our
backward-compatibility guarantees.

To be on the safe side I would say we have introduced a regression in
svn_client_copy4/3/2/1() and should fix it. This would probably involve
a three-way option: options "fail" and "delete" for the old APIs, and
option "move" for the new svn_client_copy5() API.

Can you see if it would be much work to do that?

Contrary opinions welcome.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-27 00:49:19 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.