On Thursday 11 March 2004 02:56, makl wrote:
> With a small variation of the recipe you find the real error. This
> problem is reproducible with 1.0.0
>
> $ svnadmin create --bdb-txn-nosync repo
> $ svn co file://`pwd`/repo wc1
> Checked out revision 0.
>
> $ touch wc1/file1
> $ svn add wc1/file1
> A wc1/file1
>
> $ svn ci -m "" wc1
> Adding wc1/file1
> Transmitting file data .
> Committed revision 1.
>
> $ svn sw file://`pwd`/repo/foo wc1/file1
> D wc1/file1
> Updated to revision 1.
>
> # switching to something that does not exist?
I could have sworn that there was a check of the node type before actually
doing anything. However, looking at the code, the only validation on
switch_url is to see if it falls under a different repository. I think the
best solution to this problem would be to check the kind of object that
switch_url represents to make sure that:
1) It exists.
2) It represents the same kind of object that the wc path does.
I don't see any usefulness in being able switch between different types of
objects (between files and directories).
I've got a small patch here in my working copy that validates the above, but
I'm a little displeased with it at the moment since it opens another
connection to the server so that I can retrieve the object kind. I'd rather
create form one root URL and two target paths and just have one connection to
the repository.
I'll see what I can do tonight, if no one else gets a chance to play with this
first.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 11 13:28:50 2004