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

Re: svn switch problem - cannot switch from ''unclean'' checkout

From: James Coleman <jamesc_at_dspsrv.com>
Date: 2007-07-13 14:24:34 CEST

Karl Fogel wrote:
> james coleman <jamesc@dspsrv.com> writes:
>> I didn't want to delve into detail and confuse people but Hmmm, yes.
>
> You can just say your list of examples isn't complete.

Good idea.

Also searching for the error turns up a few threads and most of them are because
of this problem. It's more of a user confusion issue really.
So FAQ entry definately would be good.

User just is not told they have to remove the offending files/directories.
  It's obvious to me now.

http://www.google.ie/search?q=+site%3Asvn.haxx.se+-translate+%22Won%27t+delete+locally+modified+directory%22

>
>> Seeing the exact error svn reports might make people searching for
>> it hit the FAQ entry.
>
> Yup.
>
>> This is taking me a while as I've started testing this more.
>
> Now you see why I palmed it off on you :-).

:) and :-P

another situation (for me to log to bug and try and summarize in FAQ entry):

Also isolated a alightly harder to recover from situation.
I think this is also what we were seeing.
User is directed to cleanup but cleanup doesn't work.
Using TortoiseSVN to be realistic to real user scenario here.
Again cleaning repository manually before switch or even after switch error recovers this situation
IF you clean the right things.

Realistic situation if a temporary build file is accidentally checked in and removed.
 From then on a svn switch after build that generates that temp file will encounter
this situation.

1. using TortoiseSVN to do switch:

Error: Won't delete locally modified directory
'C:\cygwin\home\james_coleman\checkedout\quantiqa-718\source\ticket'
Error: Left locally modified or unversioned files

Little yellow exclaimation mark warning. on offending file/dirs

2. svn-unversioned |xargs rm -rf #(or remove by hand)

3. then switch again:

Error: Directory 'C:\cygwin\home\james_coleman\checkedout\quantiqa-718\source\ticket\ticketgen\.svn'
containing working copy admin area is missing
Error: Please execute the "Cleanup" command.

okay. Command-line can't switch either.

james_coleman@IEl02 ~/checkedout/quantiqa-718
$ svn switch https://source.commprove.internal/repository/quantiqa/branches/ticket-718
svn: Directory 'source/ticket/ticketgen/.svn' containing working copy admin area is missing

4. TortoiseSVN cleanup:

Error reported in pop-up dialog. A bit differently to other errors:

Subversion reported an error while doing a cleanup!
source/<dir>/<yetanotherdir> is not a working copy directory

svn-unversioned doesn't see anything

$ svn status
! L .
! L source
! L source/<dir>
     S source/<dir>/<otherdir>
~ source/<dir>/<yetanotherdir>

$ svn-unversioned

$ ls source/<dir>/<yetanotherdir>
<file>.o

5. At this point the user is not sure what to do.
    They might try a revert which seems to cause trouble.
    The correct thing to do is to Remove that manually

$ rm -rf source/<dir>/<yetanotherdir>

6. Then TortoiseSVN cleanup and then switch successful

This is because at one time the object file was checked in by accident.
It was removed but now an svn switch doesn't like deleting it decause of history.

wc/$ touch br/foo.o
wc/$ svn add br/foo.o
A br/foo.o
wc/$ svn ci -m "oops - commit foo.o by accident" br/foo.o
Adding br/foo.o
Transmitting file data .
Committed revision 20.
wc/$ svn rm br/foo.o
D br/foo.o
wc/$ svn ci -m "unversion foo.o (committed by accident)" br/foo.o
Deleting br/foo.o

Committed revision 21.
wc/$ touch br/foo.o

## now try switch

wc/$ svn switch $SVNROOT/$project/branches/br1
svn: Won't delete locally modified directory '.'
svn: Left locally modified or unversioned files

### essence of problem
### how do you know from that error you should remove this file:

wc/$ ls br
foo.o

__ACTUALLY__ now you have to remove directory br to recover

### nothing to delete anyway:
wc/$ svn-unversioned |xargs rm -rf

### user is confused. huh huh huh?
wc/$ svn switch $SVNROOT/$project/branches/br1
svn: Directory 'br/.svn' containing working copy admin area is missing
wc/$ svn cleanup
svn: 'br' is not a working copy directory
wc/$ svn switch $SVNROOT/$project/branches/br1
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
wc/$ svn cleanup
svn: 'br' is not a working copy directory
wc/$ svn switch $SVNROOT/$project/branches/br1
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

### user might spot and remove this file but in a complex repository
### there may have been lots of unversioned files

wc/$ rm -rf br
wc/$ svn switch $SVNROOT/$project/branches/br1
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
wc/$ svn cleanup
wc/$ svn switch $SVNROOT/$project/branches/br1
A br_moved
A br_moved/README
D br
  U .
Updated to revision 21.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 13 14:28:20 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.