2

I appear to be stuck in an infinite SVN loop, as it were...

My repository is located locally at /Users/Jack/MySite.co.uk/

The problem is, the .svn folder appears to have been accidentally deleted from /Users/Jack/MySite.co.uk/images/png, as such triggering the error svn: '/Users/Jack/Sites/MySite.co.uk/images/png' is not a working copy directory...

What I've tried doing is:

svn --force delete /Users/Jack/Sites/MySite.co.uk/images/png

Which says svn: Working copy '/Users/Jack/Sites/MySite.co.uk/images' locked. Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details).

So, I follow the instructions and do this:

svn cleanup /Users/Jack/Sites/MySite.co.uk/

To which Subversion responds: '/Users/Jack/Sites/MySite.co.uk/images/png' is not a working copy directory

I apologise if that's confusing, but, I'm baffled too! Any easy way to fix this? I've tried svn adding the folder in question, to which it tells me /images/ is locked. Harumph!

Thanks,

Jack

Jack
  • 9,615
  • 18
  • 72
  • 112

4 Answers4

10

Not confusing at all. It's actually a common problem. What you do is move that png directory off somewhere else, run an svn update to bring it back from the repository, and then copy any changes you've made from your saved location back into the directory.

JOTN
  • 6,120
  • 2
  • 26
  • 31
  • +1 if I had any votes left today. You'll need to cleanup after moving the directory out of the way. Assuming the broken png was up-to-date before the accident you can also just copy the .svn from the new checkout into the broken version and it'll then be fixed up enough to commit any changes you had in there. – Rup Nov 25 '10 at 19:43
  • Thank you! Well explained and sympathetic to this novice ;) cheers! – Jack Nov 25 '10 at 19:44
1

Move the faulty working copy directory out of the way somewhere. Make a fresh checkout of that directory (update the directory above will do). If you have any changed files, copy them back in.

Tynam
  • 440
  • 1
  • 3
  • 15
0

I'd suggest you do a fresh checkout from the server and reapply your changes on this one.

Jan Thomä
  • 13,296
  • 6
  • 55
  • 83
0

When I had this happen, I just removed the folder no longer containing .svn and updated from the repository. Not so nice if you have local changes, but it works.

jackrabbit
  • 5,525
  • 1
  • 27
  • 38