www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject [scm] Making a public git mirror of an Apache project
Date Sat, 12 Jul 2008 12:24:57 GMT
Hi,

Currently we only enable git-svn use for committers (authenticated
https on svn.eu), so I looked at how to make a git mirror that could
be used by external contributors.

Here's an example using repo.or.gz for hosting and Apache Tika for the
code. Note that this example only covers mirroring of the project
trunk, I haven't yet figured out how to include tags and branches.

0) Create a public git repository using http://repo.or.cz/m/regproj.cgi.

1) Create a git-svn clone of the project you're interested in:

    $ mkdir /path/to/git/repository
    $ cd /path/to/git/repository
    $ git svn init https://svn.eu.apache.org/repos/asf/incubator/tika/trunk
    $ git svn fetch --log-window-size=10000 --authors-file=/path/to/authors.txt

The log-window-size option is used to speed up the initial import and
reduce load on the svn server.

The (optional) authors-file option can be used to include the names
and @apache.org email addresses of the committers in the git-svn
commit messages. See http://people.apache.org/~jukka/authors.txt for
an example authors.txt file I prepared based on information in
http://people.apache.org/~jim/committers.html.

2) Push the clone to a public repository:

    $ git push git+ssh://repo.or.cz/srv/git/tika

3) Automate periodic updates of the mirror:

    $ crontab -l
    48 5 * * * /path/to/update.sh

    $ cat /path/to/update.sh
    #!/bin/sh
    cd /path/to/git/repository
    git svn fetch --log-window-size=10000 --authors-file=/path/to/authors.txt
    git push git+ssh://repo.or.cz/srv/git/tika

4) You're done. The mirror is available at http://repo.or.cz/w/tika.git.

Git users can then track the project for example by cloning it with
"git clone git://repo.or.cz/tika.git". That clone is similar to an
anonymous svn checkout of the trunk.

I haven't yet announced the Tika mirror anywhere (except now on this
list). How do people feel about git mirroring and using generic
hosting services like repo.or.cz for doing that?

BR,

Jukka Zitting

Mime
View raw message