Working copy XXX locked and cleanup failed in SVN

前端 未结 30 2663
鱼传尺愫
鱼传尺愫 2020-11-28 17:26

I get this error when I do an svn update:

Working copy XXXXXXXX locked Please execute \"Cleanup\" command

When I

相关标签:
30条回答
  • 2020-11-28 17:42

    I had this problem because external folders do not want to be linked into an existing folder. If you add an svn:externals property line where the destination is an existing (versioned or non-versioned) folder, you will get the SVN Woring Copy locked error. Here a cleanup will also tell you that everthing is all right but still updating won't work.

    Solution: Delete the troubling folder from the repository and make an update in the root folder where the svn:externals property is set. This will create the folder and all will be fine again.

    This problem arose for me because svn:externals for files requires the destination folder to be version controlled. After I noticed that this doesn't work across different repositories, I swaped from external files to external folder and got into this mess.

    0 讨论(0)
  • 2020-11-28 17:43

    For me none of the above solutions worked. I found a solution by breaking locks. When I performed svn cleanup, I selected "Break Locks" along with "Clean up working copy status".

    0 讨论(0)
  • 2020-11-28 17:43

    Are you using TortoiseSVN and just upgraded? I've had that problem before when moving from 1.4 to 1.5 and not rebooting. (Try a reboot).

    The reason you need to reboot is because the cache file gets all funky.

    Otherwise, to just move on, export that working copy into a new folder (don't copy the .svn hidden folders), re-checkout the project, and move all your code back, then proceed with your commit.

    0 讨论(0)
  • 2020-11-28 17:45

    SVN normally updates its internal structure (.svn/prop-base) of the files in a folder before the actual files is fetched from repository. Once the files are fetched this will be cleared up. Frequently the error is thrown because the "update" failed or prematurely cancelled during the update progress.

    1. Check any files are listed under .svn/prop-base directory
    2. Remove any files which are not under the folder
    3. Cleanup
    4. Update

    Now the update should work.

    0 讨论(0)
  • 2020-11-28 17:46

    One approach would be to:

    1. Copy edited items to another location.
    2. Delete the folder containing the problem path.
    3. Update the containing folder through Subversion.
    4. Copy your files back or merge changes as needed.
    5. Commit

    Another option would be to delete the top level folder and check out again. Hopefully it doesn't come to that though.

    0 讨论(0)
  • 2020-11-28 17:47

    When i have this problem, i find running the cleanup command directly on the problem path generally seems to work. Then I'll run cleanup from the working root again, and it'll complain about some other directory. and i just repeat until it stops complaining.

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