fast export/import can't roundtrip bzr.dev

Bug #229429 reported by Ian Clatworthy
2
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Confirmed
High
Unassigned

Bug Description

As raised by James Westby in his email of 25/3/08 ...

I've been debugging an issue with round-tripping the bzr.dev branch,
and I've found out what the issue is.

The problem was with the testsweet.py file that was in the codebase
for a while at the start. There was also completely separate (no
common ancestor) weave branch that lived for a while before being
merged in. This imported a copy of the testsweet.py file, and then
renamed it to lib/testsweet.py just before merge.

fast-import currently chokes on this, as it re-uses the file id
from the trunk when it adds the file in the weave branch, and then
falls over when it ends up with two paths with the same id after the
merge.

This could be fixed by only reusing the file-ids when the root commit
is the same, however that would then lose information if someone used
--file-ids-from.

Has anyone got any bright ideas, or is it just better to write of
file-id handling as a pain given the stream format and try to make
the best of it?

Should we try and emulate git a bit more here, and do rename detection
on the fly? The git-fast-import documentation recommends that the
export front-ends leave it up to the import backend to do this. Either
that, or we add the ability to bzr log etc.

On that note, does anyone know the name of the class of problems where
you have several weighted alternatives to choose from, where picking
some will preclude the picking of others, and you have to pick the
set that maximises the score of the solution? The specific case here
is to pick the set of likely renames given a set of possible renames
between two trees.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Feedback from lifeless on 25/3/08 ...

Uh, I don't see why file ids would be a problem.

I'm totally unsure why fast-import is using a file id from a different
branch though; either the stream has ids (use them), or it doesn't
(assign random ones).

Anything else is madness - see, oh, about 4 years back in the
archives :)

Changed in bzr-fastimport:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 229429] Re: fast export/import can't roundtrip bzr.dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
> ** Changed in: bzr-fastimport
> Importance: Undecided => High
>
> ** Changed in: bzr-fastimport
> Status: New => Confirmed
>

bzr.dev has ghosts, and I'm guessing that fast-export streams have no
concept of them.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpocqAACgkQJdeBCYSNAAO4SgCgm0UUf/+1UBWMCrrPC/adlP68
tGsAoLkkkKs4Y1p8hoLOiikBsyJoHe3x
=y1SP
-----END PGP SIGNATURE-----

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.