svnsync not working : Revprop change blocked by pre-revprop-change hook
Asked Answered
L

3

11

I'm trying to copy a used repository by using svnsync (I'm doing it this way in order to ensure optimal usage of my repository as long as its machine is working) but it does not seems to work.

I have two machines (I've changed the names, but not the other infos)

  • INITIAL : custom Linux with Subversion 1.4.5 (r25188) (as reported by svnadmin). From this machine, I'm trying to sync on a repository called SOURCE. This repository can be accessed using http protocol, and a svnsync user has been created. In SOURCE/hooks, only one executable file exists : pre-revprops-change.
  • FINAL : Ubuntu with Subversion 1.6.6 (r40053) (as reported by svnadmin). On this machine, I will sync on a repository called svn16. This repository can be accessed using http protocol, and a svnsync user has been created. In svn16/hooks, executable files are pre-revprop-change and start-commit. On this machine, dav_svn.conf contains directive SVNParentPath /var/svn, making all repositories accessible under http://FINAL/svn

I've ensured URLs and login/pwd are correct by opening each repository URL in my browser and issuing authentication dialogs, which always seemed to work.

I'm trying to execute the following command

svnsync initialize http://FINAL/svn/svn16 http://INITIAL/SOURCE

But it always end up showing

Authentication realm: <http://FINAL:80> All Subversion Repositories hosted on FINAL
Password for 'ubunut-user':
Authentication realm: <http://FINAL.fr:80> All Subversion Repositories hosted on FINAL
Username: svnsync
Password for 'svnsync':
svnsync: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existent
svnsync: At least one property change failed; repository is unchanged
svnsync: Error setting property 'sync-lock':
Revprop change blocked by pre-revprop-change hook (exit code 255) with no output.

I guess there is some kind of configuration issue somewhere§. But what ? And where ? I've reached my limits, and the web seems of no help here, as the various docs I've seen suggest making hooks executable by the whole universe is an efficient solution (what it's not in my case).

Leisurely answered 23/8, 2010 at 7:33 Comment(0)
L
13

Turns out I was dumber than dumb.

In such an error case, the easiest way to ensure all is working correctly is invoking various hooks by hand.

It revealed my pre-revprop-change hook was incorrectly written with

"#!/bin/sh"
exit 0

Obviously, removing the " solved the issue.

Leisurely answered 23/8, 2010 at 9:32 Comment(1)
For Windows just create an empty bat file for the hook echo rem dummy > %mirror%\hooks\pre-revprop-change.batPunnet
S
12

Just a little note, to avoid very often mistake.

In case of such error first be sure that pre-revprops-change file is executable. If not, execute:

chmod +x $DEST_SVN_REPO/hooks/pre-revprops-change,

where $DEST_SVN_REPO -- path to destination repository.

Stouthearted answered 22/4, 2012 at 14:51 Comment(2)
Using samba, the file was not executable. Making it executable by changing options on my mount command solved my problem. Thanks.Hearthside
that should read pre-revprop-change, not that anyone other than me still uses svnGreenery
G
1

see here: https://svn.apache.org/repos/asf/subversion/trunk/notes/svnsync.txt

you destination config is failed. INIT phase (copying attributes) must be done. Inside pre-revprops-change script you should code username allowed to update. otherwise destination will be damaged by users. svn cannot work as active-active nodes. usually you configure hook script for prevent any modification by users. they should have only reaad access got.

generally go to superuser web service. there this is out of topic.

Gellman answered 4/11, 2013 at 13:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.