[MERGE] Add an InventoryEntry cache for xml deserialization
John Arbash Meinel
john at arbash-meinel.com
Mon Dec 15 18:35:46 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
>>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:
...
> On the tests front, far less failures but still some in
> fast-import:
> FAIL: bzrlib.plugins.fastimport.tests.test_processor.TestRename.test_move_to_new_dir
> [] is renamed
> not equal:
> a = 0
> b = 1
>
>
> FAIL: bzrlib.plugins.fastimport.tests.test_processor.TestRename.test_rename_in_root
> [] is renamed
> not equal:
> a = 0
> b = 1
>
>
> FAIL: bzrlib.plugins.fastimport.tests.test_processor.TestRename.test_rename_in_subdir
> [] is renamed
> not equal:
> a = 0
> b = 1
>
> Since they are around fast-import using an inventory for its own
> purposes and apparently being tricked by the cache when trying to
> handle renames, I'm not sure where the bug should be fixed, but
> since I saw the test failures, I thought I should at least report
> them.
>
> Vincent
>
So I dug into this, and I've fully determined that bzr-fastimport is at
fault here.
Specifically if you check the last-modified revision for an
InventoryFile, it is not updated during rename. So in all of those
tests, the .revision attribute is wrong.
Attached is a patch which seems to fix it for me. It turns out a bit
more difficult because to add a node to the per-file graph, you have to
have a text to give it, which means we have to artificially extract the
old text.
Anyway, it passes my definition of working and correct, and isn't
tripped up by us using a cache on "(file_id, revision_id)".
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklGo4IACgkQJdeBCYSNAAPItgCgrZB4IuxxTaMQLFxgp7XlC3rU
ImcAnAqnRFXJSOomy96yanE7QMKyttn2
=WZpq
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fast_import_rename.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081215/2356b3e4/attachment-0001.diff
More information about the bazaar
mailing list