Skip to content

Instantly share code, notes, and snippets.

@dreispt
Last active August 29, 2015 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dreispt/d9b751a6aac8e7728c36 to your computer and use it in GitHub Desktop.
#!/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