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

Fwd: Re: mv != (cp && rm)

From: Florin Iucha <florin_at_iucha.net>
Date: 2001-11-28 02:34:19 CET

On Tue, Nov 27, 2001 at 07:03:04PM -0600, Karl Fogel wrote:
> Mattias Rönnblom <hofors@lysator.liu.se> writes:
> > I think what I'm trying to say that there is just one side of a mv
> > command, and that changing the name of the node.
>
> In Unix, there is one side.
>
> Subversion is not Unix.

Regardless, it should respect the principle of least astonishment...

[Even ms-(dos|win(nt)?) has atomic "ren". And NT has a silly utility|daemon
that will update the registry when you rename an executable that contains a
COM object.]

> In Subversion, it is possible to commit one
> side of the operation without committing the other.

You are talking here about the frontend, right?

It is possible for the backend to implement "mv" as "cp && rm" if and only
if the "mv" semantics is preserved.

But "cp && rm" and "mv" are not equivalent because "mv" is atomic, while
"cp && rm" is not. What if my host commits the cp and then the network blows
up? You end up with two objects.

> What is your suggested behavior?

Regardless of how the backend is implemented, the frontend should have an
atomic "mv".

florin

-- 
"If it's not broken, let's fix it till it is."
41A9 2BDE 8E11 F1C5 87A6  03EE 34B3 E075 3B90 DFE4

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:49 2006

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.