Skip to content. | Skip to navigation

Personal tools
Sections
You are here: Home Blog Centralized Git-SVN mirror

Centralized Git-SVN mirror

by Ross Patterson last modified Sep 12, 2011 04:14 PM
For those of us using lots of "git svn clone"s, is any sort of central mirror worth it?

I do almost everything in git these days, so when the code I'm committing to lives in svn that means git-svn. The initial git svn clone can take quite a while, however. Using gitify can help such that you only need to git svn clone once for each project accross multiple buildouts/branches, but it's maddening knowing that if it were just git, we'd be able to share the same clone across multiple users. So I've been wondering about options for git-svn mirrors for a while now.

I ran across this video on a "Planet ..." feed of some sort recently describing what I've been looking for. This guy also has a lot of other good git-svn thoughts. I'm just not sure it's worth it. I guess it all depends on how quickly people migrate to github or some such natively. If there's any shared interest, leave a comment or email me. If there's interest I'll start a thread somewhere.

Comments (3)

http://ferris.myopenid.com/ Oct 11, 2011 02:08 AM
Hi Ross, thanks for linking. Yeah, setting up the mirror was a lot of hassle in the beginning, but by now the recipe is pretty smooth. I recently had a breakthrough in simplifying the whole update-ref thing, described here: http://blog.tfnico.com/[…]/git-svn-mirror-without-annoying-update.html - if you plan to set up a mirror, make sure you do it that way.
https://plus.google.com/u/0/101319317918343387315 Mar 16, 2012 10:34 AM
Take a look at SubGit, http://subgit.com
It is a server-side bi-directional git-svn synchronization tool.

As far as I understand, it does exactly what you need:

1. Install SubGit into svn repository, let it convert all the revisions into corresponding git commits, preserving:

 * history including merge-tracking data, when it makes sense;
 * files and directories with the associated metadata — svn:eol-style, svn:mime-type, svn:ignore, etc.

2. Since then, every svn revision committed by any svn client get converted into corresponding git commit. And vice versa — whatever git client you use to push — SubGit converts git commits into svn revisions on every push.

3. Whenever you need it just uninstall SubGit and no synchronization will take place.
Ross Patterson Mar 16, 2012 11:11 AM
Nice! Thanks for the pointer.
Navigation
OpenID Login

Contact

me@rpatterson.net

IRC: zenwryly@irc.freenode.net
plone.org: rossp
GTalk: mer@patterson.net
Yahoo IM: patterson_ross
AIM: rosspatters
MSN: me@rpatterson.net

PO Box 7775 #10587
San Francisco, CA
94120-7775

Phone
+1 (415) 894-5323