December 16, 2016

SVN : sqlite[S5]: database is locked error

Once in a while I get this error, happened due to network issue while a svn command is being executed but wasn't able to finish.

svn: E200033: Another process is blocking the working copy database, or the underlying filesystem does not support file locking; if the working copy is on a network filesystem, make sure file locking has been enabled on the file server 
svn: E200033: sqlite[S5]: database is locked 
svn: E200042: Additional errors: 
svn: E200033: sqlite[S5]: database is locked

Fix :

$ cd /my/repository/.svn 
$ mv wc.db wc.db.old 
$ sqlite3 wc.db.old 
sqlite> .backup main wc.db
sqlite> .exit

Afterwards, do a svn cleanup. Then, you're good to go.