/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-25 16:27:34 UTC
  • mto: This revision was merged to the branch mainline in revision 4204.
  • Revision ID: john@arbash-meinel.com-20090325162734-ugfiu6gxisdc2m4p
Update Repository.iter_files_bytes() to return an iterable of bytestrings.
Several places in the code expected it to return exactly a string, so these have
been updated as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1342
1342
        install_bundle(target_repo, serializer.read(s))
1343
1343
        target_repo.lock_read()
1344
1344
        self.addCleanup(target_repo.unlock)
 
1345
        # Turn the 'iterators_of_bytes' back into simple strings for comparison
 
1346
        repo_texts = dict((i, ''.join(content)) for i, content
 
1347
                          in target_repo.iter_files_bytes(
 
1348
                                [('fileid-2', 'rev1', '1'),
 
1349
                                 ('fileid-2', 'rev2', '2')]))
1345
1350
        self.assertEqual({'1':'contents1\nstatic\n',
1346
 
            '2':'contents2\nstatic\n'},
1347
 
            dict(target_repo.iter_files_bytes(
1348
 
                [('fileid-2', 'rev1', '1'), ('fileid-2', 'rev2', '2')])))
 
1351
                          '2':'contents2\nstatic\n'},
 
1352
                         repo_texts)
1349
1353
        rtree = target_repo.revision_tree('rev2')
1350
1354
        inventory_vf = target_repo.inventories
1351
1355
        # If the inventory store has a graph, it must match the revision graph.