I am not quite good at GIT way of thinking - and kind of feel lost in the scenario I am thinking of.
To cut the long story short, I am trying to use an intermediate local Git repo to sync two separate SVN repositories on different machines/networks. I don't care about commits to the second repo - I want it to merely be a mirror of the first repo. Basically I will disallow commits to the second repo, so there should be no conflicts. So how would I do it?
I succeeded in cloning the existing SVN repo (git svn clone ..), but how do I specify this other mirror repo as a second remote to push to?
People are talking about modifying the .git/clone file directly to add a second "remote" - but then they are kind of connecting it to a new branch - I don't quite want to do that. I just want to push the changes I fetch from my main SVN repo to a second SVN remote.
Basically, to git svn fetch from SVN repo 1 and git svn dcommit NOT to SVN repo 1 but to SVN repo 2.
I understand that some kind of tracking for the second repo should be enabled. Oh gosh it seems to be possible, but I just can't figure this out. Help, anyone? Thanks.
The reason that got me stumped while looking at svnsync solution is that at a single point in time the two SVN repositories are isolated. I first need to VPN to the first repo, fetch changes, disconnect, then connect through VPN2 to second repo and push. That's why Git intermediate local repo appealed to me.. There's this, but again, I kind of find it complicated. Are there no simpler solutions? Weeell.. should I consider intermediate SVN repo or SVK repo as more natural solutions? Thanks again.
Since we don't have the requirement of
The solution that A.H. suggested seems the simplest and the most practical one. Given that
To dump contents of existing repository (all history - slow for large repositories):
svnrdump dump SOURCE_REPO > repo.dmp
To dump just the current revision:
svnrdump dump -rHEAD SOURCE_REPO > repo.dmp
by default svnrdump dump will always have at least one full version of each file, because it needs it to know how to proceed with the other incremental differences it will save (--incremental option overrides that, but we are not going to need it here - unless we keep record of the latest revision we have already dumped, and do incremental dump each time - but we don't strictly need to keep both histories aligned as far as the version numbers are concerned)
To import that dump file into the other repository (works with http/svn too?)
svnrdump load DESTINATION_REPO < repo.dmp
note that when exporting and importing, the REVISION NUMBERS are not kept in sync. - when exporting, they are not saved into dump file, and when importing, each revision is saved as incremented number - so if we dumped just HEAD revision of the source repository, and we are importing the first time, it will be saved as revision 1 in the DESTINATION repository