~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

Merge in nested progress bars

Show diffs side-by-side

added added

removed removed

Lines of Context:
1360
1360
                pass
1361
1361
            # FIXME do not peek!
1362
1362
            if self.source.control_files._transport.listable():
1363
 
                pb = bzrlib.ui.ui_factory.progress_bar()
1364
 
                self.target.weave_store.copy_all_ids(
1365
 
                    self.source.weave_store,
1366
 
                    pb=pb,
1367
 
                    from_transaction=self.source.get_transaction(),
1368
 
                    to_transaction=self.target.get_transaction())
1369
 
                pb.update('copying inventory', 0, 1)
1370
 
                self.target.control_weaves.copy_multi(
1371
 
                    self.source.control_weaves, ['inventory'],
1372
 
                    from_transaction=self.source.get_transaction(),
1373
 
                    to_transaction=self.target.get_transaction())
1374
 
                self.target._revision_store.text_store.copy_all_ids(
1375
 
                    self.source._revision_store.text_store,
1376
 
                    pb=pb)
 
1363
                pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1364
                try:
 
1365
                    self.target.weave_store.copy_all_ids(
 
1366
                        self.source.weave_store,
 
1367
                        pb=pb,
 
1368
                        from_transaction=self.source.get_transaction(),
 
1369
                        to_transaction=self.target.get_transaction())
 
1370
                    pb.update('copying inventory', 0, 1)
 
1371
                    self.target.control_weaves.copy_multi(
 
1372
                        self.source.control_weaves, ['inventory'],
 
1373
                        from_transaction=self.source.get_transaction(),
 
1374
                        to_transaction=self.target.get_transaction())
 
1375
                    self.target._revision_store.text_store.copy_all_ids(
 
1376
                        self.source._revision_store.text_store,
 
1377
                        pb=pb)
 
1378
                finally:
 
1379
                    pb.finished()
1377
1380
            else:
1378
1381
                self.target.fetch(self.source, revision_id=revision_id)
1379
1382