You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sam Hamilton <sh...@hotmail.com> on 2008/03/06 13:49:29 UTC

Subversion Mirror Problems

Hi All,

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 have edited the following hook scripts on the mirror repository:

pre-revprop-change.bat
rem Only allow log messages to be changed
exit 0

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

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>

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

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?
-- 
View this message in context: http://www.nabble.com/Subversion-Mirror-Problems-tp15873125p15873125.html
Sent from the Subversion Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Subversion Mirror Problems

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org