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

Re: Sharing files between repositories

From: Rob van Oostrum <rob.vanoostrum_at_blastradius.com>
Date: 2006-12-11 17:03:37 CET

A post-commit hook would cause your repositories to fall out of sync
if the replication ever fails for some reason (momentary connectivity
glitches). As long as you only have one writable repository and the
other one is a read-only mirror you'll be fine and the problem could
fix itself on the next commit where post-commit doesn't fail.

True multi-siting, and selectively at that, is no trivial matter by
any stretch of the imagination. I did a prototype a little while ago
using one writable repository with any number of read-only mirrors
that would reverse-proxy any attempt to write to the repository to
the single back-end writable repository. This seemed to work just
fine, and it gives you the single point of transactional scope needed
to prevent conflicts and collisions in the absence of a distributed
transaction capability. I used rsync to run the synchronization back
to the mirrors, but there's no reason why svnsync couldn't come in
handy here.

R.

On 8-Dec-06, at 8:26 PM, Lawrence Stewart wrote:

> Ryan Schmidt wrote:
>
>> On Dec 8, 2006, at 06:19, Hari Sekhon wrote:
>>
>>> i have a subversion repository at work and also one at home. The
>>> things I do
>>> at home and at work usually coincide since I never seem to stop
>>> working so
>>> I'd like to share some of my work between the two and keep files
>>> in both
>>> repositories. This is also good from an off site backup perspective.
>>>
>>> I'd ideally like to be able to check in something and for it to
>>> go to both
>>> repositories at the same time, but failing that it would be
>>> sufficient to
>>> just be able to sync the 2 often. Bearig in mind that one repo
>>> will also
>>> have some stuff I don't want in the other and vice versa...
>>>
>>> Thinking of the offsite replication point of view. This is an
>>> excellent
>>> thing to do so I'm hoping I'm not the first person to have
>>> thought this and
>>> something has been done to accomodate it.
>>>
>>> Does anybody know if this can be done and if so how I could go about
>>> implementing it?
>>
>>
>> Subversion doesn't offer this. As of Subversion 1.4 there's a new
>> thing called svnsync, but that's only for making read-only copies
>> of a repository; you want both repositories to be writeable and
>> svnsync doesn't support that.
>>
>> You may want to look into svk, which is based on Subversion and
>> is designed for distributed repositories. It may support the
>> model you're looking for.
>>
>> http://svk.bestpractical.com/
>>
>>
> I'm not sure whether this would be technically feasible or not, but
> does
> anyone know if it is possible to install a hook (post-commit?) at each
> repository that, after a successful commit, performed a commit to the
> other repository? Assuming there's only ever work occurrng at one
> repository at any one time, there shouldn't be concurrency issues with
> rev numbers changing at the other repo, and it would allow both
> repos to
> remain readable and writeable (as opposed to using svnsync to make one
> only readable).
>
> Cheers,
> Lawrence
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 11 17:04:56 2006

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