Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn - file in working copy seems "lost"

I just managed to get into a weird situation with svn. One of my files seems 'lost' as far as the working copy is concerned. When I look on the server or do a fresh checkout of the containing folder in another location, the file is there, but in this one specific working copy it seems 'lost in space'.

svn status reports no changes (so not even a missing file)

svn update does nothing

I even tried re-exporting the file to my working copy, to no effect.

  • What is going on here?
  • How can I fix the working copy?

I would like to avoid having to resort to a fresh checkout of the whole working copy, if possible.

like image 380
jeroenh Avatar asked Nov 10 '09 23:11

jeroenh


People also ask

How do I get rid of working copy lock in svn?

The solution is to run the svn cleanup <PATH> command to unlock the directory that is locked.

What is svn working copy?

A Subversion working copy is your own private working area, which looks like any other ordinary directory on your system. It contains a COPY of those files which you will have been editing on the website.

Does svn copy preserve history?

Whilst you can copy or move files and folders within a repository, you cannot copy or move from one repository to another while preserving history using TortoiseSVN. Not even if the repositories live on the same server.


2 Answers

SVN 1.6.1 clients (including TortoiseSVN) had a bug where folders would sometimes erroneously be set to depth "empty". This causes the symptoms you describe. (Note that it's possible that the folder was made "empty" by svn 1.6.1 and has remained that way even though you've already upgraded to a newer svn client in the mean time.)

To fix it, use the "update to revision" menu item in TortoiseSVN and select the depth "fully recursive".

like image 176
Wim Coenen Avatar answered Sep 21 '22 07:09

Wim Coenen


You should:

  • Verify that you're updating to the correct revision and that you're updating the current item and all its descendants... something like svn update --revision HEAD --depth infinity
  • Cleanup with svn cleanup and try again
like image 44
Miguel Ventura Avatar answered Sep 23 '22 07:09

Miguel Ventura