Subversion stuck due to “previous operation has not finished”?

后端 未结 29 2568
情歌与酒
情歌与酒 2020-12-12 08:48

If I try to update my subversion repo, it says I must run cleanup. If I run cleanup, it says a file is missing. (I deleted a MASSIVE directory of files that failed to commit

相关标签:
29条回答
  • 2020-12-12 09:52

    I just had a similar issue. Running Process Explorer showed that another program (Notepad++) had a file handle to a folder that SVN had tried to delete. When I closed Notepad++, "Clean Up" was able to run successfully.

    0 讨论(0)
  • 2020-12-12 09:53

    I had the same problem, and somehow found that I had a hidden .svn file at the c:\ level. Once I deleted this hidden folder (.svn), everything worked okay. I must have unintentionally created a working directory at the root drive.

    0 讨论(0)
  • 2020-12-12 09:54

    There is often no need for a new checkout or copying.

    I have just solved a similar issue relating to the error "previous operation has not finished" with help from this (Link)

    It seems that svn sometimes gets stuck while processing commands/operations. All of these operations are stored in the database file wc.db in the .svn folder.

    By downloading SQLite to my checkout directory and running

    sqlite3.exe .svn/wc.db "select * from work_queue"
    

    you can get a list of all pending operations. These operations are the ones the error is referring to as "not finished".

    By running

    sqlite3.exe .svn/wc.db "delete from work_queue"
    

    all of the old operations are deleted from the work queue and the error disapears. No need for a new checkout or anything

    0 讨论(0)
  • 2020-12-12 09:54

    That has happened for me when using externals and one of them was corrupt. I had to go to that folder and perform a cleanup. Then the cleanup worked for the entire working copy.

    Example: Using external ^/widgets/foo common/foo-widget, first perform cleanup on folder common/foo-widget.

    0 讨论(0)
  • 2020-12-12 09:55

    Further to Sigurd V's answer (you should try that first), some larger code bases have multiple '.svn' folders, and it's not necessarily the one in the root directory which has the locked task.

    If that's the case, you have to check each one. If you've already got SQLite and Powershell you can locate the offending directory quickly.

    To find which folders is locked run (replacing path\to\sqlite.exe):

    Get-ChildItem -Path . -Filter '.svn' -Recurse -Hidden | foreach { $toFind = $_.FullName + "\wc.db" ; gci $toFind | foreach { echo $_.FullName ; path\to\sqlite.exe $_.FullName "select * from work_queue" } }.

    This gives a list of .svn directories and, below each one, a list of any current tasks.

    If there are any with unfinished tasks, for each one run (replacing path\to\sqlite.exe and path\to\.svn\wc.db):

    path\to\sqlite.exe path\to\.svn\wc.db "delete from work_queue"

    0 讨论(0)
提交回复
热议问题