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

Re: Switching a replaced file corrupt the WC

From: Martin Scharrer <mailinglists_at_madmarty.de>
Date: 2006-12-17 22:50:39 CET


On Saturday 16 December 2006 14:08, Kazutoshi Satoda wrote:
> The attached script will reproduce the problem.
It does on my machine with svn 1.4.2.

> After running the
> script, all remote operations for the file becomes to fail with a
> error message:
> $ svn update wc
> svn: Working copy path 'file' does not exist in repository
> The error message does not help because the file actually exists in
> the repository.
Yes the file exists but in the trunk, _not_ in the switched branch.
What you did is the following:

1) added a file as 'trunk/file' (committed)

2) deleted this file in your working copy of 'trunk'
3) added a new file with the same name in your working copy of 'trunk'

4) Switched your working copy to a empty 'branch/' of the repository

Now your working copy holds the 'branch/' dir but still have operations
(del&add = replace) made to a working copy of the 'trunk/'.
The update tells you set the file you deleted ( now /branch/file ) does not
exist in the repository, which is right! (only /trunk/file exists!)

Because you made this kind of change, didn't committed them and then switched
to an other repository path _you_ caused an inconsistency between rep and wc.

To solve this you should commit your changes either before or after the
switching. If you commit after the switch, the 'delete' action (and so the
resulting 'replace' action) is ignored because there was no
previous '/branch/file' to delete and your 'trunk/file' in the rep is neither
deleted nor replaced nor changed because your committed to the 'branch/' dir!

> Is there an issue about this?
This should be handled a little better by Subversion. It should recognise that
the scheduled 'delete' action is now not needed anymore or warn the user when
he switches...


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 17 22:59:36 2006

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