ok, john seems to have added a plausible test for this (test_fetch_missing_basis_text), and to have code in pack_repo along the lines Robert suggests. However, the test does not actually observe the expected error when pulling into a repository that is missing texts it ought to have.
In the relevant test we're called on an InterPackRepo, and into its .fetch method. This does seem to call Packer.pack(), which should run the checks...
Strangely enough inside the fetch we have self.source._pack_collection.all_packs() returning None. However, there are two packs in the source directory, and they are named correctly by the pack-names file, and returned from the _pack_collection.names() method. But:
(Pdb) spc.get_pack_by_name('b93e1621bbfcd744e128a46c27058d79')
*** AttributeError: 'ExistingPack' object has no attribute 'transport'
ah, the problem seems to be that the ExistingPack is unprintable because its str method tries to use a missing attribute; so this is annoying but not a big problem.
https:/ /code.edge. launchpad. net/~jameinel/ bzr/fetch- check-parents- 165290
ok, john seems to have added a plausible test for this (test_fetch_ missing_ basis_text) , and to have code in pack_repo along the lines Robert suggests. However, the test does not actually observe the expected error when pulling into a repository that is missing texts it ought to have.
In the relevant test we're called on an InterPackRepo, and into its .fetch method. This does seem to call Packer.pack(), which should run the checks...
Strangely enough inside the fetch we have self.source. _pack_collectio n.all_packs( ) returning None. However, there are two packs in the source directory, and they are named correctly by the pack-names file, and returned from the _pack_collectio n.names( ) method. But:
(Pdb) spc.get_ pack_by_ name('b93e1621b bfcd744e128a46c 27058d79' )
*** AttributeError: 'ExistingPack' object has no attribute 'transport'
ah, the problem seems to be that the ExistingPack is unprintable because its str method tries to use a missing attribute; so this is annoying but not a big problem.
to be continued...