www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: [scm] Making a public git mirror of an Apache project
Date Sun, 20 Jul 2008 16:31:45 GMT
Jukka Zitting pisze:
> Hi,
> 
> On Sat, Jul 12, 2008 at 3:24 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
>> 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.
> 
> After some more experimentation I've come up with a much improved
> setup that includes full version histories for not only the project
> trunk but also all tags and branches. I also figured a way to make
> copies of the remote tracking branches created by git-svn available to
> downstream git clones based on the git-svn clone. With this setup it's
> possible to create a git mirror of a project that allows git users to
> access the entire project history without the long (often hours)
> initial git-svn fetch. For example, making a git clone of the entire
> Ant history takes just a few minutes.
> 
> Here's the sequence of commands I use to prepare a git-svn clone of an
> Apache project. Note that I'm making the git-svn clone available to
> external clients both through gitweb and git-daemon.
> 
>     SVN_URL=... # https://svn.eu... URL of a project (below trunk,tags,branches)
>     GIT_DIR=... # Path to the bare git directory for the git-svn clone
>     GIT_URL=... # The URL at which the git repository is served by git-daemon
>     DESCRIPTION=... # Full name of the project
> 
>     export GIT_DIR
>     git svn init --stdlayout "$SVN_URL"
>     git config gitweb.owner "The Apache Software Foundation"
>     git config gitweb.url "$GIT_URL"
>     echo "$DESCRIPTION" > "$GIT_DIR/description"
>     touch "$GIT_DIR/git-daemon-export-ok"
> 
> Once the git-svn clone has been prepared, I use the following commands
> to update it:
> 
>     GIT_DIR=... # Path to the bare git directory for the git-svn clone
>     AUTHORS=... # Path to the authors file
>     export GIT_DIR
> 
>     git svn fetch --authors-file "$AUTHORS" --log-window-size=10000
> 
>     # Make the git master branch always track the svn trunk
>     git update-ref refs/heads/master refs/remotes/trunk
> 
>     # Copy all other remote branches (svn branches and tags) to normal
> git branches
>     git for-each-ref refs/remotes | cut -d / -f 3- | grep -v -x trunk
> | grep -v @ |
>         while read ref
>     do
>         git update-ref "refs/heads/$ref" "refs/remotes/$ref"
>     done
> 
>     # Prune branches or tags that have been removed in svn
>     git for-each-ref refs/heads | cut -d / -f 3- | grep -v -x master |
>         while read ref
>     do
>         git rev-parse "refs/remotes/$ref" > /dev/null 2>&1 ||
>             git update-ref -d "refs/heads/$ref" "refs/heads/$ref"
>     done
> 
>     git gc --auto
> 
> With this setup (and standard configurations for gitweb and
> git-daemon) I've configured git-svn clones of a few representative
> Apache codebases and made them available at
> http://jukka.zitting.name/git/ (gitweb) and
> git://jukka.zitting.name/<project>.git (git-daemon). These mirrors are
> automatically updated daily. If you're interested, you can browse the
> project histories on the gitweb interface or clone a project using
> "git clone git://jukka.zitting.name/<project>.git" for local
> inspection. Note that these git mirrors are highly experimental and
> may be discontinued or recreated at any time.
> 
> The script to make the mirrored clones has run for a few days now, and
> it'll probably take another day before the remaining big codebases
> (Cocoon and httpd) are done. After the initial setup it'll be easy to
> keep the mirrors up to date. Ping me if you're interested in seeing
> other Apache codebases mirrored.

Hi Jukka!

At the beginning I have to say it: sweet job, really!

I'm very happy that you have invested your time in polishing all details and providing us
a nice Git 
mirror of Apache resources.

I guess that this is a more proof of concept now but still successful one. I've managed to
clone 
Cocoon repository from your hosting in twenty minutes which compared to about eight hours
when 
cloned directly from svn is a great result.

Since I've got couple questions about tracking Apache repositories in the past (the last one
is from 
yesterday) I think it would make sense to announce your hosting somewhere as soon as we are
sure 
that we allowed to do that.
I mean here: I would like to avoid any impression that Git attempts try to bypass any Apache
rules 
or procedures when it comes to collaboration and development.

I would like to know if you are fine with me pointing a few Cocoon users to your server as
they are 
now completely stuck when it comes to tracking Cocoon using Git.

Next thing I would like to know is what are your plans and how much of load your server can
take?


                                              -- o0o --


Personally, I would prefer to see a VM instance established for Git hosting purposes and other

Git-related experiments. Then it would make sense to find out how typical contributor to Apache

project could benefit from using Git-clone of Apache repository for preparing a patch.
If we find any benefits then it would probably make sense to document how such process should
look like.

In more distant future it would probably make sense to find out if committers could digest

contributions by using Git directly. However, this looks like very distant goal.


So the basic question is: what we want to do next?

-- 
Best regards,
Grzegorz Kossakowski (who is interested in helping on such efforts)

Mime
View raw message