[IPython-dev] bzr to git migration

Fernando Perez fperez.net@gmail....
Tue Oct 18 18:42:22 CDT 2011


Hi Jorgen,

On Tue, Oct 18, 2011 at 2:05 PM, Jörgen Stenarson
<jorgen.stenarson@bostream.nu> wrote:
> I'm planning to move pyreadline over to github. Did you ever write up
> how you did the migration from launchpad to github? I'm wondering how to
> get all the branches into a single git repo properly.
>
> All bzr to git documents I've seen focus on a single bzr branch.

I never wrote anything up for real, but I do have a copy of the script I used:


#!/bin/bash
# Convert the ipython repo into a git one.
set -e

bzrepo=$HOME/ipython/repo
branches="master 0.8 0.9 0.10 0.10.1"
gitrepo=ipython-git

rm -rf $gitrepo
mkdir $gitrepo
cd $gitrepo

t0=$(date)
git init
for br in $branches
do
    echo New branch from bzr: upstream-$br
    git bzr add upstream-$br $bzrepo/$br
    git bzr fetch upstream-$br
    git co -b $br bzr/upstream-$br
done
git gc
git remote add mainline git@github.com:ipython/ipython.git

echo "Started at: $t0"
echo "Ended at  : $(date)"

#
#git push origin master

####

That might get you going with the code.  My issues migration script is here:

https://gist.github.com/835577

but github has changed its api since, so it will need some tweaking on
the upload part for the new api.

I hope this is useful to get started...

Glad to have you coming over to github!  BTW, you're welcome to create
a separate organization for pyreadline, but if you'd like, I'm happy
to make a pyreadline repo under the ipython organization and make you
owner of it.  There's little overhead in managing a separate org, but
for a small project that is so closely tied to ipython, it may make
sense to have it in the ipython org.  Ultimately it's your call, just
let me know if you want it.

Cheers,

f


More information about the IPython-dev mailing list