[IPython-dev] bzr to git migration
Aaron Meurer
asmeurer at gmail.com
Wed Oct 19 02:53:29 EDT 2011
On Tue, Oct 18, 2011 at 5:42 PM, Fernando Perez <fperez.net at gmail.com> wrote:
> Hi Jorgen,
>
> On Tue, Oct 18, 2011 at 2:05 PM, Jörgen Stenarson
> <jorgen.stenarson at 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 at 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
I'd highly recommend putting it under an organization either way,
rather than just under your personal account (you can have a fork
there if you won't always push directly to the main repo). It looks
much more professional to see something like
github.com/pyreadline/pyreadline than
github.com/someusername/pyreadline. It's also easier to remember :)
Aaron Meurer
More information about the IPython-dev
mailing list