git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Export from bzr / Import to git results in a deleted file re-appearing

From
Jeff King <peff@peff.net>
Date
Jul 12, 2012, 21:01 UTC
Message-ID
<20120712210138.GA15283@sigill.intra.peff.net>
In-Reply-To
<87ehogrham.fsf@bitburger.home.felix>
On Thu, Jul 12, 2012 at 08:00:17PM +0200, Felix Natter wrote:
Show 14 quoted lines
> 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
Previous: Felix NatterNext: Andreas Schwab
Message 2 of 9 in “Export from bzr / Import to git results in a deleted file re-appearing”
  1. Felix NatterJul 12, 2012
  2. Jeff KingJul 12, 2012
  3. Andreas SchwabJul 13, 2012
  4. Jeff KingJul 13, 2012
  5. Andreas SchwabJul 13, 2012
  6. Felix NatterJul 14, 2012
  7. fast-import: catch deletion of non-existent file in inputJeff King, Jul 15, 2012
  8. Jonathan NiederJul 15, 2012
  9. Jeff KingJul 16, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.