Svnsync - Failed to get lock on destination

Using svnsync

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

after interrupting the process, this error message occurred with a repeat

 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 any way to fix this problem?

+50
svn svnsync
Nov 02 '10 at 12:27
source share
6 answers

In fact, there is a feature built into svnsync that can β€œsteal” a 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 nice:

 Stole lock previously held by '[hostname]' 

So you no longer need the propeller thing

+54
Apr 17 '13 at 7:02
source share

You need to remove the lock property in the remote repository via the svn command line on the remote site, which was left after a failure during synchronization.

 svn propdel --revprop -r0 svn:sync-lock file:///path/to/the/repository 
+52
Nov 02 '10 at 12:37
source share

Technically, this is a recipient repository that you need to remove from the property, and not from the remote repository, since the destination may be local. So for this specific question:

 svn propdel --revprop -r0 svn:sync-lock ${REPO} 
+9
Dec 23 2018-11-11T00:
source share

Removing the lock worked for me. However, I had to use a slightly different command, since I had to send the account username and password to unlock the account.

 svn pdel --revprop -r 0 --username ??? --password ??? svn:sync-lock file:///path/to/the/repository 

I also had to run this command from the disk on which the repository was installed. (change in d: on the command line before running the command if my repository was on d :)

Before entering the username and password, when I ran the command, I received the following error:

 revprop change blocked by pre-revprop-change hook (exit code 255) 

I found and opened the pre-revprop-change binding file, and there was code containing only a specific username that could make the necessary changes. Using this username and password in the above command removed the hook.

+3
Jun 09 2018-11-21T00:
source share

To confirm the presence of a lock (although this obviously indicates an error), run proplist with -verbose

 svn pl --revprop -v -r 0 file:///svn/slave 

then remove the support as necessary!

+3
Oct 14 '13 at 5:44 on
source share

You have to do two things to solve the problem. One of them removes the lock, as described above. Then you have to edit the pre-revprop-change.tmpl file, which will be empty, and make it executable. Use chmod + x on Linux / Unix / Mac, but change the file name to pre-revprop-change.bat on Windows. After that, you can upload the dump files to your repository, and then mirror it where you need it.

+2
Nov 03 '11 at 16:14
source share



All Articles