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

RE: Proposal: Genuine renames/moves within the WC.

From: Oliver Klozoff <stevieoh_at_fastmail.fm>
Date: 2005-01-12 15:48:54 CET

> "Oliver Klozoff" <stevieoh@fastmail.fm> writes:
>
> > However, entries with the 'moved' attribute *should* be allowed to
> > move again, so that this:
> >
> > # [case 2]
> > $ svn mv a b
> > $ svn mv b c
>
> You don't need to add a 'moved' attribute to implement that,
> in fact it would be wrong to do so because there is no reason
> not to support
>
> $ svn copy a b
> $ svn mv b c

Okay, now consider this situation:

$ svn cp adir bdir
$ svn mv bdir/afile ./afile
$ svn commit afile

What are we supposed to do now?
The file afile came from bdir/afile. bdir/afile comes into existence by way
of copying adir to bdir. So, in order to make bdir/afile exist so that we
can move it, we have to commit 'bdir' first.

If you look carefully, you'll see that this is more-or-less identical to the
copy-of-a-copy problem, mentioned at the end of libsvn_wc/copy.c:

$ svn cp foo foo2
$ svn cp foo2 foo3
$ svn commit foo3

We can't commit foo3 because the file we copied it from (foo2) doesn't exist
in the repository yet. As such, we avoid the problem entirely by
prohibiting the second copy above.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 12 15:50:05 2005

This is an archived mail posted to the Subversion Dev mailing list.