From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Natter Subject: Re: Export from bzr / Import to git results in a deleted file re-appearing Date: Sat, 14 Jul 2012 16:33:35 +0200 Message-ID: <878vem1kg0.fsf@bitburger.home.felix> References: <87ehogrham.fsf@bitburger.home.felix> <20120712210138.GA15283@sigill.intra.peff.net> <20120713130246.GB2553@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sat Jul 14 16:33:57 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sq3Pw-00050h-Uw for gcvg-git-2@plane.gmane.org; Sat, 14 Jul 2012 16:33:57 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536Ab2GNOdw (ORCPT ); Sat, 14 Jul 2012 10:33:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:58030 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814Ab2GNOdv (ORCPT ); Sat, 14 Jul 2012 10:33:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sq3Po-0004jx-Co for git@vger.kernel.org; Sat, 14 Jul 2012 16:33:48 +0200 Received: from pd9e8261c.dip.t-dialin.net ([217.232.38.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jul 2012 16:33:48 +0200 Received: from fnatter by pd9e8261c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jul 2012 16:33:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: pd9e8261c.dip.t-dialin.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:StJPVYOzD+VTMpwL+gTerRlyZ88= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Andreas Schwab writes: > Jeff King 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