www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: [scm] Making a public git mirror of an Apache project
Date Wed, 10 Sep 2008 15:54:42 GMT
Hi Jukka,

On Sun, Jul 20, 2008 at 8:57 AM, Jukka Zitting <jukka.zitting@gmail.com>
> wrote:
> Ping me if you're interested in seeing other Apache codebases mirrored.
>
>
Sorry I'm late to the party. Could you also mirror ODE (
http://svn.apache.org/repos/asf/ode/)? That would be really appreciated.

FWIW, recently I've been using a personal mirror on github that gets
synchronized frequently with ODE trunk. I've only exported a partial history
to avoid putting stress on Apache SVN. The fun part is a Ruby script that
has been written by a Buildr contributor (they use the same scheme) that
does all the heavy lifting. To get started, you just do:

ruby -e 'require "open-uri";eval(open("
http://github.com/matthieu/apache-ode/tree/master%2Fode-git.rb?raw=true
").read)

This gets the script from the repo and executes (I know it's a potential
security disaster but I do read scripts before I execute them). This
automatically checks out the mirror for you and sets up a few Git aliases
like 'apache-pull' or 'apache-push' in your new repo. The most interesting
one I guess is 'synchronize':

[alias]
  apache-fetch = !git-svn fetch apache/trunk
  apache-merge = !git merge apache/trunk
  apache-pull = !git apache-fetch && git apache-merge
  apache-push = !git-svn dcommit --username mriou
  get = !git apache-fetch && git fetch origin
  mrg = !git apache-merge && git merge origin
  rbs = !git rebase --onto apache/trunk origin/master master
  put = !git apache-push && git push origin
  synchronize = !git get && git rbs && git put

At the end of the checkout it outputs a few guidelines on how to use these
commands and details the setup a bit. It's pretty damn brilliant (I can
insist, I'm not the author).

Anyway I'm just mentioning it in case there's something you (or someone
else) could reuse in the script. It seems that your setup is working pretty
well though so you probably don't need much of it.

Thanks for your work!
Matthieu

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message