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

Re: [PATCH] Allow copy files that already copied

From: Michael Brouwer <mb.7766_at_gmail.com>
Date: 2005-12-20 00:14:17 CET

Disallowing multiple svn cp or svn mv commands on already copied or
moved files is still not orthogonal to how the normal cp and mv
commands work. So to truly solve the problem of people seeing
unexpected errors you'd need to allow for those types of operations in
a wc.

That said this might be a lot more work than just changing revert, and
it might not be worth the effort by itself, but from a consistency and
ease of use point of view allowing what Molle outlined would make
sense.

Michael

On 19 Dec 2005 14:18:26 -0600, kfogel@collab.net <kfogel@collab.net> wrote:
> Molle Bestefich <molle.bestefich@gmail.com> writes:
> > Scenarios:
> > 1.) You accidentally rename 'abc' to 'dex' instead of 'def'.
> > 2.) You accidentally rename 'abg' to 'def' instead of 'abc' to 'def'.
> > 3.) You accidentally copy 'abc' to 'dex' instead of 'def'.
> > 4.) ... etc ...
> >
> > We'll start with 1).
> > # svn mv abc dex
> >
> > Oops, should've been 'def'. It now seems very obvious (user POV) to
> > undo the move by 'svn mv'ing the file to a correct filename:
> > # svn mv dex def
> > svn: Use --force to override this restriction
> > svn: Move will not be attempted unless forced
> > svn: 'dex' has local modifications
> >
> > That fails, with an unrelated and therefore very poor error message
> > (local mods?!).
> >
> > The user might then try to 'svn revert'. He's a bit confused now,
> > because which file should be the target of svn revert - the renamed
> > one or the original one?
> >
> > He tries the renamed one first since it actually exists in his filesystem:
> > # svn revert dex
> > Reverted 'dex'
> >
> > Only to find that it does not accomplish what he expects (renaming the
> > file back). Judging from the above output, it actually looks like it
> > reverted 'half' of the rename, eg. the addition of dex, but did not
> > undo the removal of 'abc'. If he has local mods, he'll be very
> > worried, but let's assume for now that he hasn't and it's OK that
> > 'dex' is gone. He now does a regular 'ls' but sees that 'dex' is
> > still there:
> > # ls
> > dex
>
> If we fixed revert to Do The Right Thing, would that solve the
> problem?
>
> > He's getting more confused. Then he tries to svn revert the original
> > file instead:
> > # svn revert abc
> > Reverted 'abc'
> >
> > Only to find that now he has TWO files - both the original and the
> > moved-to file:
> > # ls
> > abc
> > dex
>
> And this should do the same thing, IMHO.
>
> In other words, if we made these recovery steps work right, that would
> solve most of the problem, no?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
Received on Tue Dec 20 01:12:50 2005

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