Skip to content

Instantly share code, notes, and snippets.

@dreispt dreispt/bzr2git.sh
Last active Aug 29, 2015

Embed
What would you like to do?
#!/bin/sh
lp_url=lp:project-service
bzrdir=bzr-repo
gitdir=git-repo
rm -rf $bzrdir
rm -rf $gitdir
bzr init-repo $bzrdir
bzr branch $lp_url $bzrdir/trunk
#bzr branch $lp_url/6.0 $bzrdir/6.0
bzr branch $lp_url/6.1 $bzrdir/6.1
bzr branch $lp_url/7.0 $bzrdir/7.0
git init $gitdir
bzr fast-export --export-marks=marks.bzr $bzrdir/trunk | GIT_DIR=$gitdir/.git git fast-import --export-marks=marks.git
bzr fast-export --import-marks=marks.bzr -b 6.1 $bzrdir/6.1 | GIT_DIR=$gitdir/.git git fast-import --import-marks=marks.git
bzr fast-export --import-marks=marks.bzr -b 7.0 $bzrdir/7.0 | GIT_DIR=$gitdir/.git git fast-import --import-marks=marks.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.