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

Re: [PATCH] Fix for issue 3799 - exporting file should not overwrite

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Fri, 25 Feb 2011 15:32:43 +0000

On Sat, 2011-02-19, Noorul Islam K M wrote:
> I think it is this way
>
> If specified target ('/tmp/iota' in the example above) is a ...
> nothing -> fine
> file -> if 'force' then overwrite else error
> symlink -> if 'force' then overwrite else error
> special -> if 'force' then overwrite else error
> dir -> if sub-target ('/tmp/iota/iota') is a ...
> nothing -> fine
> file -> if 'force' then overwrite else error
> symlink -> if 'force' then overwrite else error
> special -> if 'force' then overwrite else error
> dir -> error cannot force

(That's all when the source is a file; a dir is handled differently.)

OK, that looks good. I agree that that would be a good behaviour to
implement.

I see that svn_client_export5() handles the URL case and the WC case in
completely different ways. A URL source is handled with an "editor",
whereas a WC source is handled by calling copy_versioned_files() which
tries to do the everything including the source tree-walking by itself.

I studied the implementation of copy_one_versioned_file() and
copy_versioned_files(), and I added doc strings to them in r1074526.
copy_versioned_files() is a mess: there are lots of things wrong with
it, so I can't believe it works properly.

Does this "overwrite else error" behaviour work the same for exporting
from a URL as exporting from a local WC? Please could you check whether
that's already being tested, and extend your test if not.

- Julian
Received on 2011-02-25 16:33:28 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.