Re: Export from bzr / Import to git results in a deleted file re-appearing
Andreas Schwab sch...@linux-m68k.org writes: Jeff King p...@peff.net writes: On Fri, Jul 13, 2012 at 11:04:21AM +0200, Andreas Schwab wrote: If you run only the bzr half of your command and inspect the output, you will see that the file in question is mentioned twice. Once in a commit on refs/heads/master that renames into it from another file: R freeplane_plugin_spreadsheet/src/org/freeplane/plugin/spreadsheet/SpreadSheetUtils.java freeplane_plugin_formula/src/org/freeplane/plugin/formula/SpreadSheetUtils.java That same revision also removes it, but is uses the original name for the deletion (the bzr revision actually renames the containing directory). That's probably what confuses git fast-import. [...] The output contains these lines: R a/b b/b D a/b Changing the second line to D b/b fixes the bug. Yeah, I agree that is problematic. But I do not think it is a fast-import bug, but rather bogus output generated by bzr fast-export (I am not clear from what you wrote above if you are considering it a bug that fast-import is confused). It seems nonsensical to mention a file both as a rename source and as deleted in the same revision, and certainly I would not expect an importer to deduce a link between the second line and b/b. IMHO fast-import should raise an error in this case, like it does when you switch the lines. +1. Thanks very much for fixing bzr-fastexport! Also many thanks to Jeff for the analysis! Best Regards, -- Felix Natter -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Export from bzr / Import to git results in a deleted file re-appearing
On Fri, Jul 13, 2012 at 11:04:21AM +0200, Andreas Schwab wrote: If you run only the bzr half of your command and inspect the output, you will see that the file in question is mentioned twice. Once in a commit on refs/heads/master that renames into it from another file: R freeplane_plugin_spreadsheet/src/org/freeplane/plugin/spreadsheet/SpreadSheetUtils.java freeplane_plugin_formula/src/org/freeplane/plugin/formula/SpreadSheetUtils.java That same revision also removes it, but is uses the original name for the deletion (the bzr revision actually renames the containing directory). That's probably what confuses git fast-import. [...] The output contains these lines: R a/b b/b D a/b Changing the second line to D b/b fixes the bug. Yeah, I agree that is problematic. But I do not think it is a fast-import bug, but rather bogus output generated by bzr fast-export (I am not clear from what you wrote above if you are considering it a bug that fast-import is confused). It seems nonsensical to mention a file both as a rename source and as deleted in the same revision, and certainly I would not expect an importer to deduce a link between the second line and b/b. -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Export from bzr / Import to git results in a deleted file re-appearing
Jeff King p...@peff.net writes: On Fri, Jul 13, 2012 at 11:04:21AM +0200, Andreas Schwab wrote: If you run only the bzr half of your command and inspect the output, you will see that the file in question is mentioned twice. Once in a commit on refs/heads/master that renames into it from another file: R freeplane_plugin_spreadsheet/src/org/freeplane/plugin/spreadsheet/SpreadSheetUtils.java freeplane_plugin_formula/src/org/freeplane/plugin/formula/SpreadSheetUtils.java That same revision also removes it, but is uses the original name for the deletion (the bzr revision actually renames the containing directory). That's probably what confuses git fast-import. [...] The output contains these lines: R a/b b/b D a/b Changing the second line to D b/b fixes the bug. Yeah, I agree that is problematic. But I do not think it is a fast-import bug, but rather bogus output generated by bzr fast-export (I am not clear from what you wrote above if you are considering it a bug that fast-import is confused). It seems nonsensical to mention a file both as a rename source and as deleted in the same revision, and certainly I would not expect an importer to deduce a link between the second line and b/b. IMHO fast-import should raise an error in this case, like it does when you switch the lines. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely different. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Export from bzr / Import to git results in a deleted file re-appearing
On Thu, Jul 12, 2012 at 08:00:17PM +0200, Felix Natter wrote: I am trying to move freeplane's repository (GPL-project) from bzr to git, but when I do this: $ mkdir freeplane-git1 $ cd freeplane-git1 $ git init . $ bzr fast-export --export-marks=../marks.bzr ../trunk/ | git fast-import --export-marks=../marks.git $ git checkout then there are no errors, but the resulting working index is broken: freeplane-git1/freeplane_plugin_formula/src/org/freeplane/plugin/formula contains SpreadSheetUtils.java which belongs to package 'org.freeplane.plugin.spreadsheet' and which is no longer in the bzr trunk that I imported! If you run only the bzr half of your command and inspect the output, you will see that the file in question is mentioned twice. Once in a commit on refs/heads/master that renames into it from another file: R freeplane_plugin_spreadsheet/src/org/freeplane/plugin/spreadsheet/SpreadSheetUtils.java freeplane_plugin_formula/src/org/freeplane/plugin/formula/SpreadSheetUtils.java and another similar case creating a merge commit. But it is never deleted. So from a cursory inspection, it looks like git is right to include the file in the final output (but I didn't trace the complete history graph, so it's possible that those commits are somehow not used in the final result). Which leads me to believe that the bug is in bzr. -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html