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

Re: svn cp URL URL behavior

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-06-26 15:29:18 CEST

Ben Collins-Sussman <sussman@collab.net> writes:

> Or should we just say, "hey, svn cp URL URL won't overwrite anything,
> period." I mean, I guess that *would* be consistent with our
> out-of-date commit philosophy.

Not permitting copy to overwrite gets my vote

Initially, I was surprised anyone would think allowing it was correct,
I assumed it was an obvious bug! Given that others think that perhaps
it ought to be allowed made me think a bit more. If we allow
overwriting there is no procedure that can be used to avoid doing it
by accident. I can check that the destination doesn't exist before
the copy, but that doesn't guarantee that the destination doesn't get
created between the check and the copy operation.

On the other hand disallowing overwriting means that a copy operation
can not be guaranteed to succeed. Once again I can check for the
destination first, and delete if required, but as before I cannot
guarantee that the destination does not get created between the check
and the copy.

If I overwrite a destination by accident, it is not obvious that it
has happened. If the copy fails because the destination exists I get
a visible error. To my mind the latter behaviour is preferrable, and
the consistency with commit reinforces my view.

Having a '--force' flag to allow overwriting would be acceptable
(maybe even ideal), but I don't see it as necessary.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 26 15:29:51 2002

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.