It is not quite that simple, as there are 4 distinct bugs being resolved here that don't all get triggered through the same code paths. Anyway, it fails on pretty much any trivial import from git (i don't see any tests actually testing the functionality of the code anywhere :/), here is a shell script that demonstrates the failure. Also probably requires bzr-2.2 because there is a bug in bzr-2.3 that will produce an exception unrelated to the bug in bzr-fastimport.
It is not quite that simple, as there are 4 distinct bugs being resolved here that don't all get triggered through the same code paths. Anyway, it fails on pretty much any trivial import from git (i don't see any tests actually testing the functionality of the code anywhere :/), here is a shell script that demonstrates the failure. Also probably requires bzr-2.2 because there is a bug in bzr-2.3 that will produce an exception unrelated to the bug in bzr-fastimport.
#!/bin/bash
TESTDIR= /tmp/git- bzr-test bzrtest $TESTDIR/ $BZRBRANCHNAME
BZRBRANCHNAME=
BZRBRANCH=
if [ -d "$TESTDIR" ];
then
rm -rf $TESTDIR
fi
mkdir $TESTDIR
cd $TESTDIR
# Make a bzr branch to interact with
bzr init $BZRBRANCH
cd $BZRBRANCH
echo "touch" > touch.txt
bzr add touch.txt
bzr commit -m "touch test"
echo "touch2" > touch2.txt
bzr add touch2.txt
bzr commit -m "touch2 test"
# Make the git repo and import the bzr repo _git/.git/ bzr/map _git/.git/ bzr/repo _git/.git/ bzr/repo/ master
--export- marks=$ {BZRBRANCH} _git/.git/ bzr/map/ master- bzr \
--git- branch= bzr/master ${BZRBRANCH} _git/.git/ bzr/repo/ master | \ marks=$ {BZRBRANCH} _git/.git/ bzr/map/ master- git
git init ${BZRBRANCH}_git
cd ${BZRBRANCH}_git
mkdir -p ${BZRBRANCH}
bzr init-repo --no-trees ${BZRBRANCH}
bzr branch ${BZRBRANCH} ${BZRBRANCH}
bzr fast-export --plain \
git fast-import --quiet --export-
# -- captured output (bzr fast-export) -- bzr/master
#commit refs/heads/
#mark :1
#committer termie <email address hidden> 1296532203 -0800
#data 10
#touch test
#M 644 inline touch.txt
#data 6
#touch
#commit refs/heads/ bzr/master
#mark :2
#committer termie <email address hidden> 1296532203 -0800
#data 11
#touch2 test
#from :1
#M 644 inline touch2.txt
#data 7
#touch2
# -- .git/bzr/ map/master- bzr --
#:1 <email address hidden>
#:2 <email address hidden>
git branch master bzr/master
git checkout master
# Make some changes and push them back _git/.git/ bzr/repo/ master ${BZRBRANCH} _git/.git/ bzr/repo/ pushed marks=$ {BZRBRANCH} _git/.git/ bzr/map/ master- git \
--export- marks=$ {BZRBRANCH} _git/.git/ bzr/map/ pushed- git \
pushed | \ marks=$ {BZRBRANCH} _git/.git/ bzr/map/ master- bzr \
- -export- marks=$ {BZRBRANCH} _git/.git/ bzr/map/ pushed- bzr \
- \
$ {BZRBRANCH} _git/.git/ bzr/repo/ pushed
git checkout -b pushed
echo 'touch3' > touch2.txt
git add touch2.txt
git commit -m 'touch3 test'
bzr branch ${BZRBRANCH}
git fast-export --import-
bzr fast-import --import-
# -- captured output (git fast-export) --
#blob
#mark :3
#data 7
#touch3
#commit refs/heads/pushed
#mark :4
#author termie <email address hidden> 1296532204 -0800
#committer termie <email address hidden> 1296532204 -0800
#data 12
#touch3 test
#from :2
#M 100644 :3 touch2.txt