~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

Fixup pb usage to use nested_progress_bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
422
422
        repo_dir = bzrdir.BzrDirMetaFormat1().initialize('repository')
423
423
        repo = repository.RepositoryFormat7().initialize(repo_dir)
424
424
        target_format = repository.RepositoryFormatKnit1()
425
 
        pb = bzrlib.ui.ui_factory.progress_bar()
426
 
 
427
425
        converter = repository.CopyConverter(target_format)
428
 
        converter.convert(repo, pb)
 
426
        pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
427
        try:
 
428
            converter.convert(repo, pb)
 
429
        finally:
 
430
            pb.finished()
429
431
        repo = repo_dir.open_repository()
430
432
        self.assertTrue(isinstance(target_format, repo._format.__class__))
431
433