{{{ ZX2C4 }}}

I frequently find myself wanting to look through the Qt source or look through a couple of commits. I could keep a copy of Qt checked out on all the computers I use, and flick through the repository using git command-line or qgit or even git instaweb, but this is usually less convenient than simply heading over to gitorious. Unfortunately, gitorious is notoriously sluggish and I find their site design a bit hindering as well.

So I’ve decided to mirror Qt’s repository on my personal server running cgit, which is much much faster than Gitorious. It’s synced once an hour by cron. And if nobody abuses this, I’ll keep it open for the community.

Head on over to git.zx2c4.com/qt.

Next up, I might attempt to mirror KDE’s subversion repository on my CGit. I’m not a very big fan of websvn, and I know KDE is moving to git, but the main tree won’t be moved for quite some time. Anyone an expert at git-svn and can provide some tips for a mirroring script to a bare repository? As we speak, I’m running git svn fetch on a repository made with git svn init --stdlayout svn://anonsvn...., and then manually adjusted to be bare. The import is taking a long time…

Update update update: Holy cow. After leaving git svn fetch running overnight, I’m on revision 41671 of 1159974… which is only 3.5% done (and by the way, I’m running this out of a data center’s über-bandwidth connection). KDE has a huge history; this is obscene. Any pointers here? Should I stop this? Have I done something silly that will render the eventual result unusable?

August 6, 2010 · [Print]

6 Comments to “Qt Git Mirror”

  1. Diederik van der Boor says:

    For a better mirror strategy, you may want to look at `git clone –mirror`.

    It also does the remote setup, and sets up the proper fetch line for you :)

  2. Jason says:

    @boor
    This is indeed very appealing, but because I’m using gitolite to manage my remote repositories, I begin with a custom bare repo, and clone creates a new repo. I suppose I could run git clone –mirror –bare and then attempt to copy in gitolite’s hooks myself, but somehow I’m skeptical of this approach. There must be a way of doing it without clone… I’ll have to examine the fetch line that clone sets up, as you say.

  3. Moshroum says:

    Just do change the remote stuff to

    [remote "origin"]
    fetch = +refs/*:refs/*
    mirror = true
    url = git://blabla

    And after that you must done in a bare repository:

    [core]
    repositoryformatversion = 0
    filemode = true
    bare = true

    The update must be done using

    git remote update –prune

  4. Jason says:

    @Moshroum
    Thanks so much! Perfect.
    What’s the difference between git remote update –prune and git fetch –all –prune? Also, it looks like the latest git has a –tags option or git remote add that adds a tagopts variable to the remote config. Does this simply do git fetch –all –tags when git remote update is called?

  5. Answered my own question lookin at the source. — no difference, yes.

  6. thomas says:

    syncing kde svn using git-svn is not very useful; read the techbase wiki and the scm mailinglist for the suggested solution; it includes splitting up the dir structure and a special tool for conversion.

Leave a Reply