74

Without thinking I added and committed a file through my osx system that had a question mark in it not thinking about how this would impact windows. On windows when I did the update it failed because it was unable to create a file with a ? in it so I went back to my osx system and did an svn rename on the file however on windows this did not help since svn goes through the history of all steps to bring a workspace up to the head revision. Needless to say I am stuck, any ideas how I can fix this?

Here is my current svn error log when updating (tried using Tortoise SVN and command line, both are the same):

svn: E155009: Failed to run the WC DB work queue associated with 'F:\Devel\bc\dev\trunk\appShare\media\frontend\?_12x15.png', work item 53314 (file-install appShare/media/frontend/?_12x15.png 1 0 1 1)
svn: E720123: Can't move 'F:\Devel\bc\dev\trunk\.svn\tmp\svn-68A36D23' to 'F:\Devel\bc\dev\trunk\appShare\media\frontend\?_12x15.png': The filename, directory name, or volume label syntax is incorrect.

Each time I do this I have to delete the records in the WORK_QUEUE table in wc.db and then do a cleanup before svn will let me try something else.

zb226
  • 9,586
  • 6
  • 49
  • 79
mirswith
  • 1,285
  • 1
  • 10
  • 15

19 Answers19

96

Thanks to this reference for a solution that worked on Mac with svn installed via brew.

cd {work-dir-base}
sqlite3 .svn/wc.db "delete from work_queue"

Here is another blog entry dealing with this issue.

zb226
  • 9,586
  • 6
  • 49
  • 79
Mike D
  • 5,984
  • 4
  • 31
  • 31
32

These are the steps that I did to get rid of this error

  1. Download sqlite from https://www.sqlite.org/download.html, download the Precompiled Binaries for Windows. I downloaded sqlite-tools-win32-x86-3200100.zip which contains the .exe of sqlite

  2. Extract the zip and add the path where you kept the sqlite3.exe to your windows PATH variable.

  3. Now navigate to the location of your .svn directory

  4. Open in command window and execute the sqlite3 .svn/wc.db "delete from work_queue"

  5. Now go ahead and run your svn cleanup, everything should work fine.

ZygD
  • 22,092
  • 39
  • 79
  • 102
PipoTells
  • 511
  • 6
  • 11
  • I committed a .dll that svn didn't have access to write to which prevented me from doing any commits, updates, or clean up. The steps above resolved the issue for me. – HPWD Sep 14 '21 at 20:35
18

For Windows users.

  1. Copy sqlite3.exe where .svn directory exist.
  2. Open CMD as admin
  3. commands :
    C: sqlite3 .svn\wc.db 
    sqlite> select * from WORK_QUEUE;
    sqlite> delete from WORK_QUEUE;
    sqlite> .quit
    C: svn cleanup
James K. Lowden
  • 7,574
  • 1
  • 16
  • 31
Ashu
  • 341
  • 2
  • 5
  • this worked beautifully - thank you! Some explanations would make this solution even more perfect. I used [scoop](https://scoop.sh/) to run sqlite directly from terminal, then simply ran sqlite .svn\wc.db and followed the rest. One should mention `svn cleanup` requires svn commandlnie tools (that are not installed by default in tortoise svn). – user2305193 Aug 06 '20 at 20:25
  • Thank you. after the struggle of the day. – navis1692 Feb 02 '22 at 12:42
11

Creating an .svn/tmp directory solved the issue, in my case

Vinnie James
  • 5,763
  • 6
  • 43
  • 52
  • 1
    YES! I had deleted this as it had wrongly grown to 500+ GB. Making the empty directory again worked. – Adambean Oct 15 '22 at 18:55
9

That is to delete the folder through svn on the windows box that contained the badly named file. This must tell svn to not bother updating that folder if it sees a local delete that has not yet been committed. If you do this be sure to back up your files first so you can recreate the folder and add all the files again (named properly of course).

In concrete terms:

  1. SVN Rename file on other machine to right filename
  2. SVN Delete the folder that contains the badly named file on the Windows machine.
  3. Update your working copy, this will now work fine.
  4. Resolve the conflict between renaming and deleting.
  5. Revert your local modifications (SVN delete, which has not been committed yet).
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
mirswith
  • 1,285
  • 1
  • 10
  • 15
9

I have also faced a similar problem:

I have deleted a local folder (for which svn files were checked out). After this none of the svn commands were working fine, even from cmd prompt(admin), also svn cleanup was not working.

Fix:

  1. I have created a dummy file, for which the error 'svn: E155009: Failed to run the WC DB work queue associated with' is coming.
  2. Then I have run svn cleanup in cmd line, found the same error in that a file couldn't be read
  3. Repeated the above steps for the file not found in step2.
  4. svn cleanup, it works!
User42
  • 970
  • 1
  • 16
  • 27
Sri436
  • 91
  • 1
  • 1
5

Closing all the visual studio instances fixes the problem to me.

Linoy
  • 1,363
  • 1
  • 14
  • 29
  • Underrated comment... could not cleanup at all, until I closed Visual Studio, and I could. Thanks! – Bram Feb 26 '20 at 20:03
4

We ran into this issue because MalwareBytes Ransomware Protection was turned on along with a few other MalwareBytes components.

Others have reported that Bitdefender caused this issue as well, on both MacOS and Windows.

The actual error we saw was

Can't move 'xxx' to 'yyy': Access is denied.

It also broke the ability to run a cleanup operation.

It seems to be a race condition -- the offending file changes each time. Disabling the Ransomware Protection component resolved the issue.

Lynn Crumbling
  • 12,985
  • 8
  • 57
  • 95
  • @Steve Glad it helped someone! We spent HOURS dealing with this. – Lynn Crumbling Feb 16 '18 at 17:58
  • 2
    This issue occurred with Bitdefender on MacOS. I turned off Bitdefender's "autopilot" and all was well once again. Don't forget to turn your antivirus protection back on when you are done! – CFitz May 29 '18 at 20:20
  • Also here the problem was Bitdefender, I am under Windows 10. – Zac Nov 26 '18 at 13:35
2

Just delete .svn\tmp in the workspace.Did work for me.

Amruta
  • 51
  • 2
  • 3
    There is no tmp in the .svn folder in my case. Actually created it solved the problem. – DrB Jun 20 '17 at 08:47
2

Another way to resolve this issue. What is happening is the SVN is trying to perform an action (WC database), but for some reason that action did not finish properly, so it throws an error. You can try to have it finish the action by replacing the file, or make a dummy file that it complains about and then do an SVN clean, and update/commit, or what every you were doing.

Patrick
  • 21
  • 1
2

Svn uses a database in the .svn folder to help itself track work in progress and assist it in doing rollbacks, etc. Unfortunately, if you can crash svn in just the right way it can quit where it thinks a file has been created and it needs to set permissions on it, but it never quite created the file (on Windows).

As the above answers describe, you can use sqlite's command shell to fix this. But the changes are far higher than you have Python available to you, and sqlite3 is one of python's built-in packages, so you can usually fix it as follows:

# cd to top of working copy
python -c "import sqlite3" -c "db = sqlite3.connect('.svn/wc.db')" -c "db.execute('DELETE FROM WORK_QUEUE;')" -c "db.commit()"
kfsone
  • 23,617
  • 2
  • 42
  • 74
1

This occurs when one of your file from that folder is in use. Generally the file is being used by a process like EXE or some task which runs concurrently on your system.

Sanjeev Singh
  • 3,976
  • 3
  • 33
  • 38
1

I was able to fix it thus:

  1. Right-click on the item, click on "Tortoise SVN -> Update to revision"
  2. The item will be deleted
  3. Run SVN cleanup
  4. The file will reappear
Pierre
  • 4,114
  • 2
  • 34
  • 39
0

I just opened the file in notepad ( a .less file in my case ), gave it a modification ( enter for instance ) and saved the file. After that i was able to clean up.

Gonçalo
  • 561
  • 5
  • 14
0

To solve the issue in windows 7, let's say in your folder X that won't cleanup there is another folder called A in which the issue appear. Just checkout the folder A elsewhere and copy it back (of course without .svn cached folder) to X and then run cleanup and update etc.

The Beast
  • 1,629
  • 2
  • 29
  • 42
0

I figured out I was getting this issue because some CLI process was using the file and it was blocking access to it. In my case a background job in a Laravel queue.

0

I know this is an old issue but, in my case, there was another issue not mentioned in any of the other answers.

When pulling from a Unix server on a Windows machine you might ( sometimes ) get files or folders with the same name but different casing.

In my case it was failing at a folder Sanitize.js and a file sanitize.js.

To get around this I decided to make the work directory case sensitive by following this and this

Cleanup and update worked as they should afterwards.

Cornel Raiu
  • 2,758
  • 3
  • 22
  • 31
0

svn: E155009: Failed to run the WC DB work queue associated with "some-bad-file" work item "file-number" file-install "some-bad-file 1 0 1 1" svn: E000022: Can't move "version-of-file-in-.svn/tmp" to "some-bad-file": Invalid argument

I recently had this issue on Kubuntu 20.04. There was a bad filename that was a result of my running a script to bulk rename files in an svn folder. I got it working without needing to access the repo machine as follows:

  1. Copy bad filename from error in command-line (in my case, there was a colon I added from when I added the file using TortoiseSVN in Windows).
  2. Copy and rename "version-of-file-in-.svn/tmp" appropriately
  3. run the commands stated in @PipoTells answer. The same works with Debian flavours because sqlite3 comes preinstalled, at least for Kubuntu 20.04 as far as I know.
  4. Delete the badly named file: "svn delete path/to/bad-file-name.extension". It doesn't seeem to matter that the file is not in your working copy at this point. The command is still sent to the repo machine and executed on commit.
  5. "svn add path/to/correctly-named-file.extension"
  6. "svn commit" and "svn update"

I hope this will help anyone else who comes accross it.

TNP
  • 1
-2

Delete the file that was causing the issue and then do a clean up. This will fix the issue

Vairav
  • 9
  • @pipotells answer has rescued me from catastrophe now three times. Simply deleting the file and cleaning up never works for me. – Leo Simon Nov 05 '21 at 18:37