Cause analysis and solution of “SVN: e155009: failed to run the WC DB work queue associated with”

problem description

error when using SVN checkout on a project:

svn: E155009: Failed to run the WC DB work queue associated with '/home/.../doc', work item 39 (file-install doc/{U+7ED3}{U+7B97}{U+5FEB}{U+7167}.doc 1 0 1 1)

looks at my directory, finds that the file is not completely checkout, and tries to perform SVN update to get an error. Let me do cleanup


[nigel@DevTJ-todo-1507091995 ~/]$ svn update
svn: E155037: Previous operation has not finished; run 'cleanup' if it was interrupted

error when performing SVN cleanup, let me

[nigel@DevTJ-todo-1507091995 ~/]$ svn cleanup
svn: E155009: Failed to run the WC DB work queue associated with '/home/...', work item 39 (file-install doc/{U+7ED3}{U+7B97}{U+5FEB}{U+7167}.doc 1 0 1 1)
, by the time we get here, it’s completely unworkable.

cause analysis

a problem is, of course, Google, on the Stack Overflow find an article that the problem of link:
which describes the causes of this problem appears:

This happens, for instance, when you (sure, unintentionally) included an Xcode build directory to 
your svn repository and try to check it out on Windows, which will not allow some characters to be
 used in a file name–‘>’ in the example above. SVN doesn’t resolve this problem: the unaccomplished 
should be done prior to any other operations through “svn cleanup”, which in essence flush all 
unfinished operations. This, however, makes an error as it tries to do something not achievable.

basically: when SVN checkout, if there is an unrecognized symbol in the file name, the checkout operation blocks the rest of the operations that follow – including cleanup. At this point, we can only get SVN to work if we have some other way to clean up the failed checkout operation in the “to-do” list.
prior to SVN 1.7, SVN USES numerous small files to store version-related information. But after 1.7, SVN replaces this with a centralized SQLite database in the.svn folder called WC.db.

[nigel@DevTJ-todo-1507091995 ~/dev/.../.svn]$ ls
entries  format  pristine tmp  wc.db  wc.db-journal

The list of operations for

SVN is stored in the WORK_QUEUE table of the SQLite database. So now the direction is clear — we just need to delete this failed checkout operation in the database SQLite and we’re done. But how exactly should operate?


to open the wc.db database, we need a shell script called sqlite3, which can be downloaded from its website
will be unzipped and sqlit3 will be copied to. SVN folder:

[nigel@DevTJ-todo-1507091995 ~/dev/.../.svn]$ ls
entries  format  pristine  sqlite3  tmp  wc.db  wc.db-journal

then executes the following query statement

sqlite3 wc. Db “select * from work_queue”

to see blocked operations in the action queue:

[nigel@DevTJ-todo-1507091995 ~/dev/.../.svn]$ sqlite3 wc.db "select * from work_queue"
39|(file-install doc/结算快照.doc 1 0 1 1)

you can see that there is an operation record, and then execute the following command to delete the operation:

sqlite3 wc.db “delete * from work_queue”

this step is executed successfully without any hint:

[nigel@DevTJ-todo-1507091995 ~/dev/.../.svn]$ sqlite3 wc.db "delete  from work_queue"
[nigel@DevTJ-todo-1507091995 ~/dev/.../.svn]$

and we’re done! This is where the SVN cleanup occurs:

[nigel@DevTJ-todo-1507091995 ~/dev/...]$ svn cleanup
[nigel@DevTJ-todo-1507091995 ~/dev/...]$

Read More: