views:

3497

answers:

5

Seems like a simple problem:

  • I have an SVN repo inside our firewall.
  • I have an SVN repo outside our firewall.
  • I have users inside, and outside, the firewall. (no VPN isn't an option :( that'd be too easy)
  • machines inside the firewall CAN talk to the outside SVN server. But not the other way.
  • the outside SVN is a temporary thing - the main repo will always be inside.

I want to somehow (from inside, most likely) take all the changes in one, and apply them to the other. And vice versa. Sounds simple, and I assume that the likes GIT can do this, but we are using SVN.

Anyone done this? I don't mind it being a manual process - there are only a couple of external people, and they don't need updates to-the-minute, two or three times a day would do.

I believe apache.org does this, but I can't find docs on HOW they do this. There are a couple of products out there which do it (well, one), but I'd love to know if anyone has a nice, clean way to do it without them. svnsync does this, just only in one direction (master-slave)

Happy to have it run on windows, Linux or Mac, as we have all of them. Windows and Mac preferred though.

Help! :) :)

[update] after 12 months of messing around (and not needing this in the end), the correct answer is, in my opinion, correct. Use git - have one repo which pulls from SVN-A, then push to a new git repo, then push from there to SVN-B. Should work :)

+4  A: 

Simplicity is usually the best way, and it sounds like you already have a simple solution: Use the SVN Repository outside the firewall.

You've already said machines inside the firewall can reach it, and obviously machines outside can reach it... so that's everyone, so what justification do you have for a second SVN repository inside the firewall? If it's just as a back-up, then just back-up the one on the outside.

Let me know if I'm missing part of your requirements.

Another thought... if you have both internal and external SVN instances... what is to stop them both giving out the same changelist ID at the same time, for different purposes? If you're seeking a de-centralised solution you should look towards GIT rather than SVN.

Thanks, but we need to keep the main one inside - this is a temporary thing, as a collegue needs to work at home. I didn't explain that before, sorry (updated the question tho). Thanks :)
Nic Wise
+1  A: 

One thing you could try is to replicate the repo at file level. I am using FolderShare (http://www.foldershare.com - runs on Windows and Mac) for a similar scenario, though I am replicating it only for backup purposes and have not tried to connect using SVN to the replica.

Franci Penov
+2  A: 

Hmm...keeping two repos in sync with each other is non-trivial, I think. It would involve basically turning SVN into Mercurial or Git.

+4  A: 

I'd recommend SVK or git-svn.

Both of these let you create an external mirror of your svn repository, and allow the external devs to make commits directly to the external mirror. You can then pull and push changes from this external mirror to your internal master repo.

git-svn would (I think) require the external developers to use git. I prefer it, but I'd be reluctant to push this on others.

SVK, however, allows the external developers to continue using svn. Since the internal repo is only accessible internally, an internal account or user would have to handle the periodic syncronization (a cron job would probably work).

Here's an extended howto on the SVK wiki: UsingSVKAsARepositoryMirroringSystem

jmanning2k
A: 

http://wandisco.com/subversion/multisite/

Subversion MultiSite leverages WANdisco's unique replication technology to immediately synchronize Subversion repositories connected over a wide area network (WAN). Users at every location experience local area network (LAN) speed performance for both read and write operations. Subversion MultiSite also provides continuous hot backup and self-healing capabilities that automate disaster recovery, so that downtime is virtually eliminated.

Can I set how much bandwidth wandisco is allowed to consume?
Peter Kahn