How to solve the cleanup and lock problems of the SVN directory


Recently, I encountered a problem when using SVN, that is, due to carelessness during the operation, I clicked Cancel during the update process, which caused the operation prompt of cleanup to appear in the directory.

OK, after following the cleanup prompt, it prompts that the directory is locked...

There is a solution on the Internet that finds the .svn hidden directory in the SVN directory, usually in the root directory of the project, and there is a wc.db database file in the .svn directory.

We use sqlite3.exe to open this database and operate on it.

The method I use is to download sqlite3.exe and put it in the .svn directory, start the command line, and type in the command:
sqlite3.exe wc.db

At this time, we enter the command line environment of sqlite, and we can operate the database. First, we enter the command:
.tables

To display all the tables in the database, we need to pay attention to wc_lock and work_queue, because the information about the cleanup and lock of the operation is stored in these two tables.

If necessary, you can use select * from wc_lock; to check whether the information in the table is the file or directory corresponding to the previous operation. If there is data in these two tables, then svn cannot perform subsequent operations.

Solution:
very simple, you just need to clear these two tables, the command is very simple:
delete from wc_lock;
delete from work_queue;

Students who need it can try it. At first, the problem of only clearing the work_queue was not solved, and it prompted the lock, so I checked the table related to the lock once and found that there were records of my operations in wc_lock, so I also cleared the table and found the problem. .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325012133&siteId=291194637