587

I get this error when I do an svn update:

Working copy XXXXXXXX locked Please execute "Cleanup" command

When I run cleanup, I get

Cleanup failed to process the following paths: XXXXXXXX

How do I get out of this loop?

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Dan
  • 27,627
  • 40
  • 142
  • 201
  • 5
    I got this message, too. The answers provided looked a little tedious (especially the highest-voted one). I just closed down VS and reoprned the solution and I was able to check everything in just fine. – oscilatingcretin Jul 16 '13 at 14:47
  • Following eakkas comment to delete entries from WORK_QUEUE table using Firefox's SQLLite Manager fixed the issue for me. – zeppelin May 12 '15 at 14:13
  • 12
    There is a simple answer, just check the option, "break locks" and that will clean up your working copy – Farhan Dec 22 '15 at 11:33

48 Answers48

519

One approach would be to:

  1. Copy edited items to another location.
  2. Delete the folder containing the problem path.
  3. Update the containing folder through Subversion.
  4. Copy your files back or merge changes as needed.
  5. Commit

Another option would be to delete the top level folder and check out again. Hopefully it doesn't come to that though.

Chuck
  • 8,114
  • 2
  • 27
  • 24
  • 124
    +1 to you for this workaround to fix not just the OP's problem (and mine), but also for giving the 5 steps that seem to fix any svn problem. -1 to subversion for needed such workarounds. – pxl Jan 17 '10 at 22:55
  • 34
    While this technically works, it is such a bad way to do this compared to removing the locks that it deserves a downvote. – Jukka Dahlbom May 02 '12 at 13:02
  • @Jukka This problem occurs because your repository is in an inconsistent state. It seems safer to me to start clean and revert or update using the tool that manages those files itself to resolve the problem. Admittedly, this takes a few extra steps. – Chuck May 10 '12 at 18:40
  • 1
    what about the current version of SVN, there is just one .svn dir, and it does not contain any lock file. I got the problem after svn crashed, now i can't even run an update – wutzebaer Jun 13 '12 at 10:32
  • 8
    I cannot do step 3 because... "Working copy is already locked" – Evgeny Mar 28 '13 at 21:02
  • 20
    Consider the advice from BradS "For me, the trick was to run 'svn cleanup' at the top of my working copy, not in the folder where I'd been working the whole time before the problem occurred." – Marco Aug 08 '13 at 12:37
  • @JukkaDahlbom Actually that's not true. This error message came to me when my file was NOT locked. I even locked and unlocked, it kept occurring. – goamn May 30 '14 at 03:13
  • This approach works. Specifically in my case, an "svn move" went wrong. I deleted the folder that I attempted to move. I ran "svn cleanup". Then I could run "svn update". I got my folder back and no locks. – Frederic Fortier Jun 25 '14 at 17:59
  • 1
    Before do this consider the advice from @BradS! – ed1nh0 Jul 22 '14 at 12:29
  • 5
    For those using Tortoise SVN, you can run clean up on the root folder of the check-out directory and force Break Locks. Additionally you can ask it to delete unversioned files. Then take an update. – Obaid Mar 15 '16 at 07:44
  • SVN may try to delete or move a used file. Be sure you have not open the IDE or run the build. – Onur Tuna Jan 11 '17 at 07:43
479

For me, the trick was to run svn cleanup at the top of my working copy, not in the folder where I'd been working the whole time before the problem occurred.

BradS
  • 1,936
  • 1
  • 15
  • 13
  • usually works but doesn't anymore, not sure if it's because I upgraded to SVN 1.7 – Populus Oct 24 '11 at 03:10
  • 4
    this worked for me with a client running 1.7, though the server is still 1.6.x – Mark Hosang Oct 31 '11 at 04:59
  • Worked for me on 1.7 much appreciated – scarpacci Feb 01 '12 at 00:22
  • 1
    I have combined the hint from Intu's answer with this one: look for the parent folder which has a "lock" file in its .svn folder, then run "svn cleanup" there. That worked for me. – rob74 Aug 16 '12 at 10:15
  • +1 This works for me (from about: Tortoise SVN 1.7.7 64 bit / Subversion 1.7.5) – amelvin Sep 10 '12 at 14:39
  • Yes, in 1.7 it cleanup has to be performed on top level directory of the working copy, Thank you. – xchg.ca Oct 16 '12 at 15:57
  • I ran a cleanup on the topmost folder and the unlock issue was resolved and I was able to checkin again. – rams Oct 26 '13 at 00:49
  • Using Subversion for Mac, select 'Clean' from the Working Copy menu. – geerlingguy Nov 15 '13 at 20:30
  • 5
    This works for me, much faster way than Chuck's way. So it's worth a shot to do this one first. – goamn May 30 '14 at 03:14
  • Works for me - svn 1.7.17. luv u (hug)(kiss) – hoangtu23 Oct 28 '14 at 23:05
  • This was what worked for me; TortoiseSVN (via SVN 1.8.10) was just telling me "cleanup failed, run cleanup." Hitting the command line at the root of the repo told me "Can't remove directory..." etc., which pointed me to the actual problem. Unlocker run on that directory let me detach handles to it and then I reran cleanup and ... it seems like it's working. – dash-tom-bang Aug 11 '15 at 23:40
  • Thanks it's so simple. – Yog Guru Mar 15 '17 at 12:04
210

Look in your .svn folder, there will be a file in it called lock. Delete that file and you will be able to update. There may be more lock files in the .svn directory of each subdirectory. They will need deleting also. This could be done as a batch quite simply from the command line with e.g.

find . -name 'lock' -exec rm -v {} \;

Note that you are manually editing files in the .svn folder. They have been put there for a reason. That reason might be a mistake, but if not you could be damaging your local copy.

SOURCE : http://www.svnforum.org/2017/viewtopic.php?p=6068

ire_and_curses
  • 64,177
  • 22
  • 110
  • 139
Intu
  • 1,529
  • 1
  • 9
  • 2
  • 8
    +1 I think this is much better approach than the currently highest voted answer - I hate having to copy the files elsewhere first to get around this (common!) problem. Mine was caused by a code-generation tool generating files with the same name that someone else had already added to SVN. My bad for not "svn up" first i suppose... – alpian Nov 09 '10 at 15:59
  • nice one, thanks a lot. To help you find the lock file if you are on a terminal type [find . -name "lock"] without the square brackets in your applications directory. – serk01 Jul 22 '11 at 09:46
  • 44
    This doesn't work anymore with Tortoise/SVN 1.7 (or at least I couldn't find any lock file as there is now a centralised DB with the metadata). – pesche Oct 06 '11 at 06:59
  • 10
    here's a quick one-liner that should recursively delete all locks starting in the current directory: `find . | grep ".svn/lock" | xargs rm` – Jesse Dec 08 '11 at 23:40
  • 1
    With SVN 1.7, @BradS's answer seems more effective. This answer did not work for me, and BradS's did. – Ira Baxter Oct 21 '12 at 20:56
  • note that the lock file maybe in a parent directory, svn told me at least which directory – ErichBSchulz Oct 26 '12 at 11:02
  • 1
    In my case there is no lock file anywhere to be found. – Tim MB Jun 13 '13 at 16:43
  • 1
    Source link was dead. – ddagsan Apr 28 '15 at 11:06
107

In my case I solved it by manually deleting a record in the SQLite ".svn\wc" file lock record in the WC_LOCK table.

I opened the "WC" file with SQLite editor and executed

delete from WC_LOCK

screenshot showing all entries purged from WC_LOCK

Following eakkas's comment, you might need to delete all the entries from WORK_QUEUE table as well.

Community
  • 1
  • 1
Gad D Lord
  • 6,130
  • 10
  • 50
  • 98
  • 1
    This worked for me for Subversion 1.7.5 on Windows. Downloaded SQLite Expert trial version from here: http://www.sqliteexpert.com/download.html. Ran the "delete" sql statement above in the SQL tab. – M Katz Nov 14 '12 at 01:51
  • This is much much better, just one difference is that I clicked the red (-) button – Rohit Srivastava Jan 14 '13 at 14:36
  • 3
    A free DI SQL Spy would also do the trick: http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index – Gad D Lord Jan 14 '13 at 15:34
  • 12
    This worked for me too but I also needed to purge the entries in WORK_QUEUE table – eakkas Sep 02 '13 at 14:07
  • 6
    Did not work by deleting the item out of WC_LOCK - what did work was looking at the blob contents of my WORK_QUEUE item and sure enough it was the issue file - I removed the file from the repo browser and then deleted the work_queue item - after this ran a cleanup and back in business! – GregM Oct 22 '13 at 13:03
  • Simple and effective : perfect solution. – Matteo Conta May 15 '14 at 07:18
  • For me the file was .svn/wc.db. I had to delete the problem entry from the WORK_QUEUE – bdrx Sep 02 '14 at 20:43
  • This was the only thing that worked out of all suggestions. Should be a "clear locks"-function. Used the free SQLite Browser http://sourceforge.net/projects/sqlitebrowser – NeutronCode Nov 20 '14 at 11:53
  • Don't forget (especially if you're used to working in something like MySQL/MSSQL!) that you need to SAVE changes to the database before you can see the effect of your SQL command(s). (At least using v3.7 of the SQL Lite Browser - http://sqlitebrowser.org/). – Carl Bussema Sep 01 '15 at 21:41
  • Worked for me. All files in the working copy were showing a "L" in the third column (locked) but TortoiseSVN was showing all files as not locked. This resolved it. – Bill Stidham May 10 '17 at 18:58
  • Nice and elegant! – FaizanHussainRabbani Aug 15 '19 at 13:30
  • This worked for me. The above methods for "Clean Up" did not. I didn't have anything in my Work_Queue table. – bliswell Jun 29 '20 at 14:30
100

Easiest way ever:

  1. Go to Parent directory(Folder) of Project.
  2. Pres Right click
  3. Press on TortoiseSVN then Press Clean up...
  4. Clean up dialog would appear automatically
  5. Select Clean up working copy status, Break locks, Fix time stamps, Vacuum pristine copies, Refresh shell overlays, Include externals
  6. Pres OK

You did your job successfully.

Check the screen shots for your reference.

First step:

enter image description here

Second step: Enable the Break lock option(second check box in cleanup popup window) enter image description here

Hope this will help you a lot.

Manish Butola
  • 527
  • 6
  • 13
Hiren Patel
  • 48,538
  • 20
  • 161
  • 144
  • 10
    in my case, the "Break lock" option was sufficient, maybe try first with this one only – Donatello Jun 15 '16 at 15:02
  • Good answer. I had a case of 'dialog blindness' with this one and never checked the clean up options. Historically, the 'navigate to root and clean up' used to work but I guess breaking the locks was sufficient in my case.. – Phil Cooper May 12 '17 at 09:25
  • 1
    Worked for me too! – Daniel Silva Jul 24 '17 at 13:40
  • Did not think 'break locks' would do it, because I did not make any locks. But apparently it breaks svn-internal locks which were causing this problem. Thanks! – basher Jan 25 '18 at 18:43
48

A colleague at work constantly sees this message, and for him it's because he deleted a directory under SVN version control without deleting it from SVN, and then created a new directory in its place not under version control, with the same name.

If this is your problem...:

There are different ways to fix it, depending on how/why the directory was replaced.

Either way, you will likely need to:

A) Rename the existing directory to a temporary name

B) Do an SVN revert to recover the directory deleted from the file system, but not from SVN

From there, you would either

A) Copy the relevant files into the directory that was deleted

B) If you had a significant change of contents in the directory, do an SVN delete on the original, commit, and rename your new directory back to the desired name, followed by an SVN add to get that one under version control.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Matt
  • 38,720
  • 26
  • 105
  • 143
  • 1
    Your second-step B) seems a very bad idea to me, as it would break the revision history for items of the original directory that are kept in the new version. – Dunaril Mar 30 '11 at 11:49
  • The very bad things happened when the person deleted a versioned directory from the file system but not from SVN. The answer above might not be a perfect recovery, but it is a recovery. – Teemu Leisti Feb 23 '12 at 13:29
38

For me none of the above solutions worked. I found a solution by breaking locks. When I performed svn cleanup, I selected "Break Locks" along with "Clean up working copy status".

enter image description here

LoveForDroid
  • 962
  • 11
  • 24
23

This one worked for me.

  1. Go to the root folder,
  2. Right click and cleanup
  3. Check all available options
  4. Press ok

After clean up it will allow you to update to the latest version.

Lance
  • 2,201
  • 3
  • 31
  • 47
  • 2
    This works for me too. You need check all available options (6 entries in my version) to proceed Clean Up; it gets fail if you just check [Clean up working copy status] and [Include externals] options. – Vincent Jia Jul 22 '13 at 03:25
  • 1
    This totally worked for me... just by right-click on project > Team > Cleanup. Haven't had to remove any row from the SQL in .svn nor anything else. Just this did the job. Thanks! – msqar Jul 24 '13 at 15:13
  • This worked for me as well in version 1.7.4 of TortoiseSVN. I went with the default check boxes that were presented. – slm Apr 14 '14 at 17:50
  • Helped me today, but I didn't needed to check all available options. The last three that revert my changes I did not check, and it worked anyway. See also http://stackoverflow.com/a/35192644/460775 – EMBarbosa Feb 18 '16 at 13:01
  • This is highly dangerous, because some of those checkboxes would destroy local work that hasn't ever been successfully transferred to the repo. – Ben Voigt Jan 11 '17 at 21:38
  • 1
    This worked for me. I just checked `Clean up working copy status` and `Breaks locks` and `Include externals` – Phiber Apr 20 '17 at 15:54
  • Did not work for me :-( I checked all options in the SVN cleanup dialog, removed all ignored files and all changes from my working copy, but I am still unable to update. – Mario Klebsch Feb 26 '19 at 12:06
11

For me, it was actually Tortoise's fault, sort of. Tortoise just complained "cannot clean up, run clean up", but when I ran the command line (svn cleanup), it clearly told me that it couldn't delete some files that were in use, the solution to which was obvious. Once I closed Visual Studio (which was keeping the files open), then the cleanup worked fine.

Other programs can also keep files open in the repo causing this issue. Excel holding an xls open was a culprit in another instance so it may be wise to close all programs that may be using anything in the repo or even rebooting to force programs to close out and then trying cleanup again.

horta
  • 1,092
  • 8
  • 17
Mark Sowul
  • 9,386
  • 1
  • 39
  • 48
7

I had this problem because external folders do not want to be linked into an existing folder. If you add an svn:externals property line where the destination is an existing (versioned or non-versioned) folder, you will get the SVN Woring Copy locked error. Here a cleanup will also tell you that everthing is all right but still updating won't work.

Solution: Delete the troubling folder from the repository and make an update in the root folder where the svn:externals property is set. This will create the folder and all will be fine again.

This problem arose for me because svn:externals for files requires the destination folder to be version controlled. After I noticed that this doesn't work across different repositories, I swaped from external files to external folder and got into this mess.

Oliver Zendel
  • 2,052
  • 24
  • 27
6

The easiest way to do this is show hidden folders and then open the .SVN folder. You should see a zero KB file named "lock" deleting this will fix the problem

fawefawefa
  • 51
  • 1
  • 1
5

I came across the exact same issue using SVN 1.7 and none of the fixes mentioned above worked.

Foremost, make sure you backup all your edited content.

After spending a couple of hours (didn't redownload everything as my branch is over 6gb in size), I found that there is a db file called "wc" in the .svn folder of your branch.

Open up the db file using any db manager (i used firefox's sqlite manager plugin) and navigate to WC_LOCK table. This table will have the entries for the acquired locks. Delete the records from the table and you're done :)

Rohan
  • 851
  • 16
  • 30
  • even though it was pretty much a duplicate of the previous answer, I gave you a vote because you mentioned the firefox SQLite manager plugin. – ehambright Feb 27 '13 at 18:58
3

When i have this problem, i find running the cleanup command directly on the problem path generally seems to work. Then I'll run cleanup from the working root again, and it'll complain about some other directory. and i just repeat until it stops complaining.

stephen
  • 101
  • 1
  • 4
3

If you're on a Windows machine, View the repository through a browser and you may well see two files with the same filename but using different cases. Subversion is case sensitive and Windows isn't so you can get a lock when Windows thinks it's pulling down the same file and Subversion doesn't. Delete the duplicate file names on the repository and try again.

toxaq
  • 6,346
  • 3
  • 43
  • 54
3

I did it by just creating a new folder, checking out the project, copying the updated files to the new folder.

It was fixed with a fresh checkout.

Don
  • 1,327
  • 3
  • 21
  • 40
  • I did the same. (I put the root cause down to AnkhSVN messing with my working copy. AnkhSVN is now uninstalled). – Scotty.NET May 16 '13 at 07:43
2

In Versions under Mac OS: Action -> Cleanup working copy locks at...

HotJard
  • 3,910
  • 2
  • 31
  • 31
2

Are you using TortoiseSVN and just upgraded? I've had that problem before when moving from 1.4 to 1.5 and not rebooting. (Try a reboot).

The reason you need to reboot is because the cache file gets all funky.

Otherwise, to just move on, export that working copy into a new folder (don't copy the .svn hidden folders), re-checkout the project, and move all your code back, then proceed with your commit.

Adam
  • 6,790
  • 2
  • 23
  • 24
2

I often get such an issue. My pattern that causes cleanup problems.

  1. I open image file in viewer.
  2. I delete image file/folder.
  3. I am trying to commit/update

Closing image viewer where deleted file is opened solves the problem. Maybe other software can block cleanup the same way.

In general. I believe restarting computer may help in such cases.

2

just delete the .svn folders, then run a cleanup on the parent directory. Works perfectly!!

Ben
  • 21
  • 1
  • 3
    In SVN 1.7, this won't work because there is only one .svn folder, at the top. If deleted, the attachment to the repository is removed. – AnneTheAgile Dec 06 '12 at 17:47
1

I did the following to fix my issue:

  1. Renamed the offending folder by placing an "_" in front of the folder name.
  2. Did a "Clean Up" of the parent folder.
  3. Renamed the offending folder back to it original name.
  4. Did a commit.
1

In solution explorer, right click on the project, in the opening sub-menu click on subversion and select clean-up. It will solve the problem, as it did for me. Hope it will work.

Nadeem Jamali
  • 1,163
  • 3
  • 15
  • 26
1

Start Search....Lock...Select all files listed and delete..fixed

Ryan
  • 3
  • 3
1

the following should do:

svn status | grep ". L" | sed 's/.* (.*)$/\1/' | awk '{print length($1),$1}' | sort -nr | awk '{print "pushd " $2 "; svn cleanup ; popd"}' | sh

bugfeeder
  • 329
  • 2
  • 2
1

To do the clean up

  1. Delete the .svn folder.

  2. Do the svncheckout in the root folder.

  3. Try performing the clean up operation.

This got my issue resolved.

Jayaguru
  • 39
  • 9
1

For me, the problem was with completely full disk drive (linux inodes in my case), when i deleted some folders it started working again.

The error was the following (on any svn action):

$ svn cleanup
svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
svn: E155004: Working copy locked; try running 'svn cleanup' on the root of the working copy ('/my/directory') instead.
svn: E155004: Working copy '/my/directory' locked
svn: E200030: sqlite[S14]: unable to open database file
svn: E200030: Additional errors:
svn: E200030: sqlite[S14]: unable to open database file
dreamzor
  • 5,645
  • 4
  • 36
  • 58
1

Do not delete your solution!

in the .svn folder you have a file called lock it is 0 bytes long

You can delete all these files from all the .svn folders in your solution and it will work

It worked in my case

Para
  • 1,806
  • 4
  • 32
  • 72
  • This is the simplest solution! Worked for me – Nathan May 22 '12 at 18:05
  • Yes, unfortunately it doesn't work for the latest version of SVN. For the latest version you do have to delete it because there is no longer a lock file. there seem to no longer be any files there is a whole other folder structure. If any one knows if there is anything that can still be modified in a manner similar to the one above please share it with us. – Para May 22 '12 at 18:17
1

If you're on Linux, try this:

find "/the/path/to/your/directory" -name .svn -type d | xargs chmod 0777 -R

Then run the cleanup command on that directory, then try to update.

stealthyninja
  • 9,960
  • 11
  • 45
  • 55
1

In-place unversioning of the files, and a fresh checkout into the same location, has solved this problem for me.

In TortoiseSVN, to do an in-place unversioning, right-drag the root folder of the working copy from the file list onto itself in the directory tree, and choose "SVN Export versioned items here" from the pop-up menu. TortoiseSVN notices that the destination is the same as the source, and suggests unversioning the working copy.

After unversioning, do a fresh checkout into the same folder (which now contains an unversioned copy of all the files you had). TortoiseSVN will warn you that you are checking out into an existing folder, but you can go ahead.

After this, cleanups, updates and other operations worked without a hitch. Since both of the above steps preserve local modifications, there should not be any loss of information (but backing the working copy up before this may nevertheless be a good idea).

One warning: If the working copy contains mixed versions or uncommitted property changes, that information WILL be lost. For me, this is not a common occurrence, and given the choice of a corrupt working copy or losing uncommitted property changes, I tend to opt for the latter.

Magnus
  • 19,360
  • 1
  • 25
  • 24
1

SVN normally updates its internal structure (.svn/prop-base) of the files in a folder before the actual files is fetched from repository. Once the files are fetched this will be cleared up. Frequently the error is thrown because the "update" failed or prematurely cancelled during the update progress.

  1. Check any files are listed under .svn/prop-base directory
  2. Remove any files which are not under the folder
  3. Cleanup
  4. Update

Now the update should work.

lud0h
  • 2,250
  • 6
  • 33
  • 40
1

Had the same problem because I exported a folder under a version-controlled folder. Had to delete the folder from TortoiseSVN, then delete the folder from the filesystem (TortoiseSVN does not like unversioned subfolders ... why not???)

  • I should add that I exported a folder TO THE SAME FOLDER .. this is how you unversion prev. versioned folders. –  Mar 12 '09 at 14:41
1

I had this problem where the "clean up" worked, but the "update" would continue to fail. The solution that worked was to delete the folder in question via Windows Explorer, not TortoiseSVN's delete (which marks the deletion as something to commit to the repository, and then I did a "checkout" to essentially "update" the folder from the respository.

More info on the difference between an O/S delete and an SVN delete here: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-rename.html

Notably:

When you TortoiseSVN → Delete a file, it is removed from your working copy immediately as well as being marked for deletion in the repository on next commit.

And:

If a file is deleted via the explorer instead of using the TortoiseSVN context menu, the commit dialog shows those files and lets you remove them from version control too before the commit. However, if you update your working copy, Subversion will spot the missing file and replace it with the latest version from the repository.

Xonatron
  • 14,362
  • 28
  • 65
  • 83
0

Updating the directory permissions (granting write access) solves the problem as well.

chmod +w <dir_name>
Karthik
  • 97
  • 1
  • 6
0

I had the same problem. Seems it has been fixed in the latest versions. I have updated my Tortoise SVN to the latest version (1.7.11) and clean up has worked well.

You can download the latest version here: downoad tortoise svn.

algreat
  • 7,762
  • 5
  • 38
  • 52
0

I know this is a really old thread but I maintain that:

The easiest and safest method to fix this is to delete your hidden ".svn" folder and check everything out again.

It fixes most problems when svn screws around should keep local changes (marked as "conflicted") when you check out the head revision again.

Izzy
  • 1,495
  • 14
  • 28
0

Clean up certainly is not enough to solve this issue sometimes.

If you use TortoiseSVN v1.7.2 or greater, right click on the Parent directory of the locked file and select TortoiseSVN -> Repo Browser from the menu. In the Repro Browser GUI right click the file that is locked and there will be an option to remove the lock.

Brian Ogden
  • 16,278
  • 7
  • 77
  • 156
0

Steps :

  1. Close all editing files from svn folder

  2. Close eclipse or any editor which are using folder or file from svn directory.

  3. Right click on svn check out folder and click on release lock.

  4. Right click on svn check out folder and click on clean.

  5. Your SVN is ready for SVN commit and update operation.

Cheers :)

Vinayak
  • 5,408
  • 1
  • 27
  • 30
0

I had this under TortoiseSVN and the error was related to a new directory I'd created under a new project. I had just created this project, so there was no way this directory had existed before. I looked in the repository browser and the new folder was indeed already in the repository, but TortoiseSVN didn't show it as committed.

In order to get around it, since I'd just created the folder anyway, I deleted it in the repository, and then did a commit. It worked fine.

Since I did this outside of Visual Studio, I then had to restart Visual Studio for it to figure everything out again.

Scott Whitlock
  • 13,473
  • 7
  • 59
  • 111
0

One reason for this problem I haven't seen in the answers is that an update or checkout may have been done with other user/permissions, like for example with $sudo.

0

First of all tried many solutions, then I just deleted the folder in which I was having trouble.

And then performed SVN Update.

That worked for me.

I would not recommend it, but nothing worked but this. :(

Swapnil Kale
  • 1,760
  • 1
  • 18
  • 21
0

@Chuck's solution wasn't practical for me. In the first time I had the problem, it worked but also gave lots extra-work. In the second case, I changed loads of file while I was using my notebook outside the network. I couldn't see myselft going folder by folder after the changed files. Had hope on tortoise and worked. See how:

Environment Was:

  1. Visual Studio 2008
  2. Ankhsvn

Procedure:

  1. First I couldn't commmit, it said that I needed to clean up
  2. Second, I couldn't clean up, there was a folder out of the svn - "bin"
  3. I downloaded Tortoise lastest version, tried and doesn't work due to dammed folder.
  4. Renamed that folder and now I could Update the local repository with the lasted version.
  5. A couple of files came in.
  6. Did the commit and worked.
Eduardo Xavier
  • 1,430
  • 21
  • 28
0

I had a file in my root directory that was messing it up. (No lock files, svn cleanup failed, etc.) My whole checkout is > 2GB with slow network speeds, so checking everything out again wasn't a great option for me.

What worked for me:

  1. Reverted & reverted change in the messed up working copy (#1).
  2. Checked out another copy of the repo (#2) with --depth empty
  3. Added and committed the file in the new working copy (#2).
  4. Updated in the original working copy (#1).

Seemed to be back to normal for me.

Nathan McDaniel
  • 951
  • 1
  • 8
  • 7
0

While doing svn update using tortoise svn, the process got interrupted and stopped complaining the file is in use. Next it asked me to use CleanUp command on the folder. I tried to run CleanUp command but it failed to do so. Then I found a command shell which was using the folder files. So, I closed the command shell and checked if any editor is using the files related to it. We need to close them as well. Again, I tried CleanUp on the folder with options Break locks,revert changes,clear working copy status . The CleanUp went successfully. Then finally able to update my svn folder.

ShivaKumar
  • 31
  • 5
0

The clean up did not work for me no matter how many ways I tried. Instead from Visual Studio I committed each folder individually. Then I committed the top folder and was successful.

Off The Gold
  • 1,208
  • 13
  • 27
0

Spotlight is its usual rubbish self at finding the lock files recursively.

EasyFind on Mac App Store works

http://itunes.apple.com/gb/app/easyfind/id411673888?mt=12

search for 'lock'

Select all / Delete

brian.clear
  • 5,154
  • 2
  • 39
  • 60
-1

These types of problems can be avoided in the first place by using svn copy and svn move etc commands when making changes to your project structure. Remember svn only checks for changes inside files already added to subversion, not changes to the physical directory structure. Please see http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html

Further, upon committing changes svn first stores a "summary" of changes in a todo list. Upon performing the svn operations in this todo list it locks the file to prevent other changes while these svn actions are performed. If the svn action is interrupted midway, say by a crash, the file will remain locked until svn could complete the actions in the todo list. This can be "reactivated" by using the svn cleanup command. Please see http://svnbook.red-bean.com/en/1.7/svn.tour.cleanup.html

Chris
  • 4,455
  • 1
  • 31
  • 37
-1

In my case, a Windows 7 machine running TortoiseSVN failed to rename a folder completely. No combination of cleanup, update, or rename operations would fix the problem. The folder was originally created with different case and Tortoise or Subversion would not change it to what was in the repository.

My solution was to:

  1. Copy the folder through Windows Explorer (without Subversion control files) outside the project.
  2. Delete and commit the folder through TortoiseSVN.
  3. Copy the folder back with the correct (current) name through Windows Explorer.
  4. Add the folder back into the repository through TortoiseSVN.

I performed cleanups after each step. Dreadful solution, but it worked for me.

Geeky Ninja
  • 5,765
  • 8
  • 35
  • 50
Suncat2000
  • 997
  • 1
  • 13
  • 17
-1

Today I have experienced above issue saying

svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

And here is my solution, got working

  1. Closed Xcode IDE, from where I was trying to commit changes.
  2. On Mac --> Go to Terminal --> type below command

svn cleanup <Dir path of my SVN project code>

exmaple:

svn cleanup /Users/Ramdhan/SVN_Repo/ProjectName

  1. Hit enter and wait for cleanup done.
  2. Go To XCode IDE and Clean and Build project
  3. Now I can commit my all changes and take update as well.

Hope this will help.

swiftBoy
  • 33,793
  • 26
  • 129
  • 124
-5

I am sure It working fine for you

Goto top level SVN folder.

Right Click on folder(that has your svn files) -> TortoiseSVN -> CleanUp

This will surely solve your problem.

Sadikhasan
  • 17,212
  • 19
  • 72
  • 111