svnsync - couldn't get lock on destination repos

sdu picture sdu · Nov 2, 2010 · Viewed 31.5k times · Source

Using svnsync

$ svnsync --non-interactive sync ${REPO}

after an abort of the process there was this error message with retry

Failed to get lock on destination repos, currently held by 'svn.test.com:0e4e0d98-631d-0410-9a00-9330a90920b3'  
...  
Failed to get lock on destination repos, currently held by 'svn.test.com:0e4e0d98-631d-0410-9a00-9330a90920b3'   
svnsync: Couldn't get lock on destination repos after 10 attempts  

Is there a way to fix this problem?

Answer

s3v1 picture s3v1 · Apr 17, 2013

Actually, there is some functionality built into svnsync (since v1.7) that can "steal" the lock.

svnsync help sync

shows:

--steal-lock             : Steal locks as necessary.  Use, with caution,
                           if your mirror repository contains stale locks
                           and is not being concurrently accessed by another
                           svnsync instance.

and when I run it, I get a nice:

Stole lock previously held by '[hostname]'

So, you don't need the propdel thing after all