~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

Fixup pb usage to use nested_progress_bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1289
1289
                pass
1290
1290
            # FIXME do not peek!
1291
1291
            if self.source.control_files._transport.listable():
1292
 
                pb = bzrlib.ui.ui_factory.progress_bar()
1293
 
                copy_all(self.source.weave_store,
1294
 
                    self.target.weave_store, pb=pb)
1295
 
                pb.update('copying inventory', 0, 1)
1296
 
                self.target.control_weaves.copy_multi(
1297
 
                    self.source.control_weaves, ['inventory'])
1298
 
                copy_all(self.source.revision_store,
1299
 
                    self.target.revision_store, pb=pb)
 
1292
                pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1293
                try:
 
1294
                    copy_all(self.source.weave_store,
 
1295
                        self.target.weave_store, pb=pb)
 
1296
                    pb.update('copying inventory', 0, 1)
 
1297
                    self.target.control_weaves.copy_multi(
 
1298
                        self.source.control_weaves, ['inventory'])
 
1299
                    copy_all(self.source.revision_store,
 
1300
                        self.target.revision_store, pb=pb)
 
1301
                finally:
 
1302
                    pb.finished()
1300
1303
            else:
1301
1304
                self.target.fetch(self.source, revision_id=revision_id)
1302
1305