Folder is locked and I can't unlock it

前端 未结 17 2196
离开以前
离开以前 2021-01-30 07:48

When I\'m trying to update or commit code from a project it\'s telling me that the folder is locked. When I try to \"release lock\" it says that there\'s nothing to unlock in th

相关标签:
17条回答
  • 2021-01-30 08:37

    To unlock a file in your working copy from command prompt that is currently locked by another user, use --force option.

    $ svn unlock --force tree.jpg

    0 讨论(0)
  • 2021-01-30 08:39

    Using svn command line to unlock the local folders, just use svn cleanup.

    Before:

    # svn commit -m "fixing #1234"

    commit

    # svn st

    before

    # svn cleanup

    After:

    # svn st

    after

    # svn commit -m "fixing #1234"

    after2

    0 讨论(0)
  • 2021-01-30 08:40

    I had this happen after having Tortoise get corrupted and crash while trying to update folders. I ended up re-installing Tortoise, but the ghost lock was still present. From there I had to delete the folder and do a new checkout. Obviously I got really lucky that I didn't have any new changes to commit at the time. Anyhow, not great news, and if anyone has a better solution I'd love to hear it myself. Even using "Break Lock" ie unlock with the force option did not change anything.

    0 讨论(0)
  • 2021-01-30 08:41

    I had this problem where I couldn't unlock a file from the client side. I decided to go to the sever side which was much simpler.

    On SVN Server:

    Locate locks

     svnadmin lslocks /root/of/repo
     (in my case it was var/www/svn/[name of Company])
    
     You can add a specific path to this by svnadmin lslocks /root/of/repo "path/to/file"
    

    Remove lock

     svnadmin rmlocks /root/of/repo “path/to/file” 
    

    That's it!

    0 讨论(0)
  • 2021-01-30 08:43

    I was able to resolve this issue on my machine by renaming folders to make the folder path smaller.

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