It's a shame that you add both "_find_present_inventory_ids" and "_find_present_inventories" to groupcompress_repo.py, but it's not trivial to factor out that duplication. Similarly, around line 950 of that file you have a duplication of the logic of find_parent_ids_of_revisions, but again reusing that code isn't trivial. Something to cleanup in the future I guess...
In test_sprout_from_stacked_with_short_history in bzrlib/tests/per_repository_reference/test_fetch.py you start with a comment saying "Now copy this ...", which is a bit weird as the first thing in a test. Probably this comment hasn't been updated after you refactored the test? Anyway, please update it.
It's a shame that you add both "_find_ present_ inventory_ ids" and "_find_ present_ inventories" to groupcompress_ repo.py, but it's not trivial to factor out that duplication. Similarly, around line 950 of that file you have a duplication of the logic of find_parent_ ids_of_ revisions, but again reusing that code isn't trivial. Something to cleanup in the future I guess...
In test_sprout_ from_stacked_ with_short_ history in bzrlib/ tests/per_ repository_ reference/ test_fetch. py you start with a comment saying "Now copy this ...", which is a bit weird as the first thing in a test. Probably this comment hasn't been updated after you refactored the test? Anyway, please update it.
1353 + for record in stream: append( record. key) l(''.join( content[ :-2]), get_bytes_ as('fulltext' )) l(''.join( content[ :-1]), get_bytes_ as('fulltext' )) l(''.join( content) , get_bytes_ as('fulltext' )) 'Unexpected record: %s' % (record.key,))
1354 + records.
1355 + if record.key == ('a-id', 'A-id'):
1356 + self.assertEqua
1357 + record.
1358 + elif record.key == ('a-id', 'B-id'):
1359 + self.assertEqua
1360 + record.
1361 + elif record.key == ('a-id', 'C-id'):
1362 + self.assertEqua
1363 + record.
1364 + else:
1365 + self.fail(
This is ok, but I think I'd rather:
for record in stream: append( (record. key, record. get_bytes_ as('fulltext' ))) content[ :-2])), (('a-id', 'B-id'), ''.join( content[ :-1])),
records.
records.sort()
self.assertEqual(
[(('a-id', 'A-id'), ''.join(
(('a-id', 'C-id'), ''.join(content))],
records)
Which is more compact and doesn't have any need for conditionals in the test, and will probably give more informative failures.
bzrlib/ tests/per_ repository_ reference/ test_initialize .py adds a test with no assert* calls. Is that intentional?
In bzrlib/ tests/test_ pack_repository .py, test_resume_ chk_bytes has a line of unreachable code after a raise statement.
In bzrlib/ tests/test_ repository. py, is the typo in 'abcdefghijklmn opqrstuvwxzy123 456789' meant to be a test to see how attentive your reviewer is? ;)
Other than those, this seems fine to me though.