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

Re: [Issue 962] - remove and move should work for missing files and directories

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-01-08 20:34:39 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> If you try yourself to implement this, reliably, handling all the edge
> cases, you will see why it was problematic. Or if you just read Ben's
> and Philip's admirably detailed comments in issue #962, you'll see
> some of the complexities of implementing this.

Consider a versioned directory foo, that is missing from the working
copy (it's been non-svn moved). Now how does

   svn mv foo bar

behave given that bar exists? (I'm using the command line client here
but the same arguments apply to the svn_client_move function.) At
present a move where bar exists creates bar/foo, obviously you want to
change that. When is bar/foo the real target and when is bar the real
target?

Consider some possibilities

- bar is unversioned
    This is probably an error.

- bar is versioned and is already part of the same working copy as foo
    Here bar/foo is the real target, it is probably an error if foo
    doesn't exist.

- bar is versioned and is not a working copy base
    This is probably an error.

- bar is versioned and is a working copy base and the bar URL/GUID
  differ from the foo URL/GUID
    This is probably an error

- bar is versioned and is a working copy base and the bar URL/GUID
  match the foo URL/GUID
    Hey, this is the one you want! However note that it may become
    an error if foo *does* exist.

The last time this came up I asked[1] those interested in the feature
to provide a complete description of the required behaviour; no such
description appeared.

As I have shown above, the number of cases that need to be considered
is non-trivial. I haven't determined how they all should work, I
don't think I have even identified them all.

[1] http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=24685

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 8 20:35:24 2003

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.