You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/12/03 09:50:43 UTC

Re: keeping 2 repos in sync?

--On Monday, November 25, 2002 3:20 PM -0500 pll@lanminds.com wrote:

> Hi all,
>
> Is there an easy way to keep to svn repos in sync with each other?

Not currently, but perhaps I can say that there might be help on the 
way shortly.

I just spent tonight introducing a replication/mirror system to SVN. 
(I've been thinking about this for a while...)  One master, many 
slaves.  Each commit to a slave transparently commits to the master. 
After a commit, the master then replicates its changes to each slave 
(that part can be done as a post-commit hook).

Given my tendencies, I implemented this entirely with tweaks to 
mod_dav_svn and some needed fixes to mod_proxy.  The client has no 
idea what is going on nor does the master server - it's all 
transparent.  It's absolutely rough around the edges right now, but 
it works as a proof of concept.  (I'm shocked actually.)

This, of course, isn't multi-master replication - you can't commit 
when your slave can't contact the master.  The downward replication 
from a master to a slave could be done more elegantly than a 
post-commit hook.  Yet, that's not what I was going for right now. 
Long-term, perhaps...  Baby steps.

Of course, SVN has a bunch of off-line operations to ease the need 
for distributed repositories, but 'svn log' being an on-line 
operation has always bugged me.

Anyway, if there is an interest in this, I can try to package it up. 
Perhaps integrate back my changes into mod_dav_svn.  And, I've 
already sent the required patch for mod_proxy to dev@httpd.  -- justin

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

Re: keeping 2 repos in sync?

Posted by Paul Lussier <pl...@lanminds.com>.
In a message dated: Tue, 03 Dec 2002 01:50:43 PST
Justin Erenkrantz said:

>--On Monday, November 25, 2002 3:20 PM -0500 pll@lanminds.com wrote:
>
>> Hi all,
>>
>> Is there an easy way to keep to svn repos in sync with each other?
>
>Not currently, but perhaps I can say that there might be help on the 
>way shortly.

Yay! :)

>I just spent tonight introducing a replication/mirror system to SVN. 
>(I've been thinking about this for a while...)  One master, many 
>slaves.  Each commit to a slave transparently commits to the master. 
>After a commit, the master then replicates its changes to each slave 
>(that part can be done as a post-commit hook).

Hmm, given my scenario, this might work.  Basically I want to have my 
laptop be able to travel between work and home and have a 'master' at 
each place.  Inverting that idea and making the laptop the ;master' 
Icould instead have a 'slave' at each location and have the 'slaves' 
sync from the laptop.

Now, the question is, can I then have clients which check out from 
the 'slaves'?  And if so, what about clients of slaves which need to 
make changes, and commit back the slave they checked out of?
(my current ideas/requirements don't include this scenario, but I can 
definitely see where it might be desirec feature for a lot of people).

>This, of course, isn't multi-master replication - you can't commit 
>when your slave can't contact the master.

Hmmm, that might pose a small problem, however, if my laptop is the 
'master' in this case, then it's unlikely my home system will ever 
need to commit when I'm at work :)

>The downward replication from a master to a slave could be done
>more elegantly than a post-commit hook.  Yet, that's not what I
>was going for right now. Long-term, perhaps...  Baby steps.

Absolutely!  Take your time and do it right! :)

>Anyway, if there is an interest in this, I can try to package it up. 
>Perhaps integrate back my changes into mod_dav_svn.  And, I've 
>already sent the required patch for mod_proxy to dev@httpd.  -- justin

I might be interested in playing with it.  If I can get it working, I 
can at least provide feedback as to what breaks down in my usage 
model.


-- 

Seeya,
Paul
--
	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

	 If you're not having fun, you're not doing it right!



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