[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion Mirror Problems

From: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Fri, 7 Mar 2008 00:13:53 -0600

On Mar 6, 2008, at 07:49, Sam Hamilton wrote:

> I have been creating a mirror repository by following the Repository
> Replication section in the Subversion Manual but rather than just
> having one
> user being able to update the repository and replicate the changes
> to the
> mirror, I want every user.

I haven't used svnsync myself, but I thought the point was that
anybody can update the master, but it's rigged so that only the
svnsync process can write to the slaves, and this is a Very Good
Thing because if just anybody could write to the slave, everything
would explode when they do, because then the slave would contain
information the master doesn't, and future synced revision numbers
would be off, and so on. So you should not set this up differently.
If you think you should set it up differently, please explain your
use case.

> I have edited the following hook scripts on the mirror repository:
>
> pre-revprop-change.bat
> rem Only allow log messages to be changed
> exit 0

On Unix, the script should read

#!/bin/sh
USER="$3"

if [ "$USER" = "svnsync" ]; then exit 0; fi

echo "Only the svnsync user can change revprops" >&2
exit 1

You'll have to convert that to the equivalent batch script for Windows.

> start-commit.bat
> rem Only allow log messages to be changed
> exit 0

I'm having trouble finding definitive documentation so I'm not sure
what, if anything, needs to go in your start-commit hook.

> I have edited the following hook scripts on the source repository:
>
> post-revprop-change.bat
> rem Sync mirror with source repository after each commit
> svnsync synchronize <Mirror Repository Location>

I think you need this instead:

svnsync copy-revprops <Mirror Repository Location> <Revision>

> postcommit.bat
> rem Sync mirror with source repository after each commit
> svnsync synchronize <Mirror Repository Location>

As I understand it that should be ok.

> Each time I now do a commit on the source repository, I receive the
> error
> message "MERGE request failed..". My scripts all run on their own
> and I am
> able to run the svnsync synchronize command on both the source and
> mirror
> servers. The user name I am using is also on both the repositories
> and has
> the same password.
>
> Does anyone have any ideas on what I might be doing wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-07 07:14:27 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.