termie / git-bzr-ng

bi-directional git to bzr bridge: never fear bzr again
BSD 3-Clause "New" or "Revised" License
198 stars 47 forks source link

git bzr clone is not deleting some files #55

Open f69m opened 11 years ago

f69m commented 11 years ago

You can use the Bazaar branch lp:phablet-extras/libhybris to reproduce this:

bzr branch lp:phablet-extras/libhybris hybris-bzr
git bzr clone lp:phablet-extras/libhybris hybris-git
diff -rq hybris-bzr hybris-git

Results in:

Only in hybris-bzr: .bzr
Only in hybris-git: .git
Only in hybris-git/hybris/gingerbread: Android.mk
Only in hybris-git/hybris/ics: Android.mk
Only in hybris-git/hybris/jb: Android.mk
Only in hybris-git/hybris/sf: surface_flinger_compatibility_layer.h

Obviously, the first two lines are OK, but the rest must be considered a bug in git-bzr-ng. And those files are causing real issues.

ghost commented 9 years ago

Yes I just got bit by this as well:

$ bzr branch lp:cupstream2distro trunk
$ git bzr clone lp:cupstream2distro master
$ diff -rq trunk master
Only in trunk: .bzr
Only in master: .git
Only in master: manual

This is causing problems with some data analytics I want to do on the branch using git-specific tools.

ghost commented 9 years ago

I tried to reproduce this issue just with bzr-fastimport and couldn't do it, so it seems like you're using bzr-fastimport wrongly somehow:

$ bzr branch lp:cupstream2distro trunk
$ cp -r trunk master
$ cd master
$ git init
$ bzr fast-export --plain . | git fast-import
$ rm -rf .bzr
$ cd ..
$ diff -rq trunk master
Only in trunk: .bzr
Only in master: .git
ghost commented 9 years ago

Nope, I'm wrong. in my example the working directory is ok but the erroneous 'manual' directory is still lingering in the commit history. I guess bzr-fastexport is itself just hopelessly broken and none of these wrappers for it are workable (same issue with git-remote-bzr and git-lp)