Acabo de pasar por eso. Estoy haciendo algo similar a rq, pero un poco diferente. Configuré uno de mis servidores para alojar estos clones git de los repositorios svn que necesito. En mi caso, solo quiero versiones de solo lectura y necesito un repositorio simple en el servidor.
En el servidor que ejecuto:
GIT_DIR=<projectname>.git git init
cd <projectname>.git/
GIT_DIR=. git svn init svn://example.com/trunk
GIT_DIR=. git svn fetch
git gc
Esto configura mi repositorio simple, luego tengo un script cron para actualizarlo:
#!/usr/bin/python
import os, glob
GIT_HOME='/var/www/git'
os.chdir(GIT_HOME)
os.environ['GIT_DIR']='.'
gits = glob.glob('*.git')
for git in gits:
if not os.path.isdir(git):
continue
os.chdir(os.path.join(GIT_HOME, git))
if not os.path.isdir('svn/git-svn'):
#Not a git-svn repo
continue
#Pull in svn updates
os.system('git svn fetch && git gc --quiet')
#fix-svn-refs.sh makes all the svn branches/tags pullable
os.system('fix-svn-refs.sh')
#Update the master branch
os.system('git fetch . +svn/git-svn:master && git gc --quiet')`
Esto también requiere fix-svn-refs.sh de http://www.shatow.net/fix-svn-refs.sh
Esto se inspiró principalmente en: http://gsocblog.jsharpe.net/archives/12
No estoy seguro de por qué git gcse necesita aquí, pero no pude hacerlo git pullsin él.
Entonces, después de todo esto, puede usar git submodule siguiendo las instrucciones de rq.