As most of you know, I run bzr-mirror.gnome.org in my spare time. This was to allow people to try out the awesomeness of Bazaar as easily as possible. As much as I love Bazaar, certain outside forces mean that I sometimes have to use Git. So a few weeks ago when no one had approached bkor to set up git-mirror.gnome.org, I decided I would.
- Follow the example in the git-svn manual, 520 times
- Run the equivalent of “bzr pull” everytime a commit happens (yay svn-commits-list)
- Throw gitweb at it
All in all it went OK. Here are some things I encountered.
- I converted conduit, f-spot, tomboy and a few larger modules like gtk+. Then I tried to clone them over http. Found out I have to call git-update-server-info in post-update hook. This is well documented, and no big deal, but a surprise as its not needed with Bazaar.
- My initial attempt was cut short by James, who spotted I was missing an important argument (–rewrite-root) in my git-svn cloning. I had to abort the import after 3 days. Rip up and retry. Or so we thought. After some talking in #git, we found that –rewrite-root http://anything works, making me wonder why the root URL is stored in the log at all.
- When I ran the import again I found some of the modules randomly aborted mid conversion. It was able to resume them manually – yay, because it was one of the bigger modules the first time (gimp).
- I also found that gitweb wasn’t showing the tags and branches. James saved me again, this time with a script from Tim Janik at Imendio. Its full of perplexing git incantations, but works perfectly. It has to run after each change to keep everything up to date.
- I couldn’t get git-svn to work on a clone. My hero James was MIA, and I was struggling. A trip to #git offered mixed results. There were patches, there were more perplexing git incantations. Nothing seemed to work. With Robs help we got it working, and when James returned we got it working with branches and tags too. Day was saved. HeroPoints++.
- My version of git-svn chokes on accerciser and fast-user-switch-applet. My hero might yet fix this one too, as his git-svn was able to convert the problematic tags (this is due to cvs2svn).
- Now the mirror is ticking along, but gtk+ won’t update properly. I can update it from a local rsync, but not over http. I get “Apache got a malformed URI: REPORT request failed on ‘/svn/gtk+/!svn/vcc/default’: Unusable URI: it does not refer to this repository at /usr/bin/git-svn line 3833″.
- gnomemm Uses a non standard layout (at least in GNOME terms) which git-svn doesn’t like that much, so I will have to special case it in my scripts.
- I still have to go back and repack all the repositories as git-svn generates packs that are excessively large, and git gc –prune –agressive isn’t enough (thanks to Pieter for this advice).
After a week of churning its nice to have my server back to normal load. I still have to try and skin gitweb so that it looks GNOMEy and there are a hundred and one other things bothering me, but now you guys can:
git clone http://git-mirror.gnome.org/git/cheese
git svn init -s svn+ssh://svn.gnome.org/svn/cheese --prefix=origin/svn/
git svn rebase
I’m not sure what will happen if you pull from the mirror and from svn.gnome.org. That is the ideal use case IMO (should be faster for you as mirror does the conversion for you). If someone wants to try and let me know how it handles it…
Want a mirror for your $dvcs? Ping me, maybe i’ll give it a go.