git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Natter <fnatter@gmx.net>
To: git@vger.kernel.org
Subject: Re: Export from bzr / Import to git results in a deleted file re-appearing
Date: Sat, 14 Jul 2012 16:33:35 +0200	[thread overview]
Message-ID: <878vem1kg0.fsf@bitburger.home.felix> (raw)
In-Reply-To: m2hatbvkyh.fsf@igel.home

Andreas Schwab <schwab@linux-m68k.org> writes:

> Jeff King <peff@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

  reply	other threads:[~2012-07-14 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 18:00 Export from bzr / Import to git results in a deleted file re-appearing Felix Natter
2012-07-12 21:01 ` Jeff King
2012-07-13  9:04   ` Andreas Schwab
2012-07-13 13:02     ` Jeff King
2012-07-13 13:39       ` Andreas Schwab
2012-07-14 14:33         ` Felix Natter [this message]
2012-07-15 10:23         ` [PATCH] fast-import: catch deletion of non-existent file in input Jeff King
2012-07-15 18:11           ` Jonathan Nieder
2012-07-16  0:26             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vem1kg0.fsf@bitburger.home.felix \
    --to=fnatter@gmx.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).