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 13, 2012, 13:02 UTC
Message-ID
<20120713130246.GB2553@sigill.intra.peff.net>
In-Reply-To
<m2pq80uj56.fsf@igel.home>
On Fri, Jul 13, 2012 at 11:04:21AM +0200, Andreas Schwab wrote:
Show 17 quoted lines
> > 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
Previous: Andreas SchwabNext: Andreas Schwab
Message 4 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.