Bug 1606973 was my original file, and then changes to bzr export.
The patch was improved by some others, and I'm storing my version of it here.
The benefit of the patch is that you get:
-
bug metadata converted: Bzr contains 'fixes' metadata (
bzr commit --fixes
) that does not get moved over to git. This updates the commit message exported to git to containLP: #XXXXXX
for each--fixes=lp:XXXXXX
in bzr. -
bzr revno info: Often times bug or other references to code may say 'fixed in revno XXX'. That information gets lost in a conversion to git. The patch here updates commit messages to contain
bzr-revno: XXX
for each bzr revision.
I just installed from Ubuntu distro.
$ sudo apt-get install bzr-fastimport bzr
I just patched the package-installed version of fastexport.py. If you find that unacceptable, then update the path to the right directory and it will still apply.
$ ( cd /usr/lib/python2.7/dist-packages/bzrlib/plugins/ &&
sudo patch -p0 --dry-run ) < fast-export.patch
$ ./bzr2git bzr-dir git-dir
...
$ cd git-dir
$ git branch
master
$ git log
...
See also: my version of a bzr2git script (currently also a snap of the same name, but I'm willing to give it up if others want to maintain it). This supports iterative transitions, if you don't want a "flag day". But doesn't support bug metadata (or any bzr metadata, for that matter).