Working copy XXX locked and cleanup failed in SVN

前端 未结 30 2515
鱼传尺愫
鱼传尺愫 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:29

    For me, the trick was to run svn cleanup at the top of my working copy, not in the folder where I'd been working the whole time before the problem occurred.

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

    A colleague at work constantly sees this message, and for him it's because he deleted a directory under SVN version control without deleting it from SVN, and then created a new directory in its place not under version control, with the same name.

    If this is your problem...:

    There are different ways to fix it, depending on how/why the directory was replaced.

    Either way, you will likely need to:

    A) Rename the existing directory to a temporary name

    B) Do an SVN revert to recover the directory deleted from the file system, but not from SVN

    From there, you would either

    A) Copy the relevant files into the directory that was deleted

    B) If you had a significant change of contents in the directory, do an SVN delete on the original, commit, and rename your new directory back to the desired name, followed by an SVN add to get that one under version control.

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

    If you're on Linux, try this:

    find "/the/path/to/your/directory" -name .svn -type d | xargs chmod 0777 -R
    

    Then run the cleanup command on that directory, then try to update.

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

    Look in your .svn folder, there will be a file in it called lock. Delete that file and you will be able to update. There may be more lock files in the .svn directory of each subdirectory. They will need deleting also. This could be done as a batch quite simply from the command line with e.g.

    find . -name 'lock' -exec rm -v {} \;
    

    Note that you are manually editing files in the .svn folder. They have been put there for a reason. That reason might be a mistake, but if not you could be damaging your local copy.

    SOURCE : http://www.svnforum.org/2017/viewtopic.php?p=6068

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

    Had the same problem because I exported a folder under a version-controlled folder. Had to delete the folder from TortoiseSVN, then delete the folder from the filesystem (TortoiseSVN does not like unversioned subfolders ... why not???)

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

    I often get such an issue. My pattern that causes cleanup problems.

    1. I open image file in viewer.
    2. I delete image file/folder.
    3. I am trying to commit/update

    Closing image viewer where deleted file is opened solves the problem. Maybe other software can block cleanup the same way.

    In general. I believe restarting computer may help in such cases.

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