~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

Fixup pb usage to use nested_progress_bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        if self.bzrdir.root_transport.is_readonly():
34
34
            raise errors.UpgradeReadonly
35
35
        self.transport = self.bzrdir.root_transport
36
 
        self.convert()
 
36
        self.pb = ui.ui_factory.nested_progress_bar()
 
37
        try:
 
38
            self.convert()
 
39
        finally:
 
40
            self.pb.finished()
37
41
 
38
42
    def convert(self):
39
 
        self.pb = ui.ui_factory.progress_bar()
40
43
        branch = self.bzrdir.open_branch()
41
44
        if branch.bzrdir.root_transport.base != self.bzrdir.root_transport.base:
42
45
            self.pb.note("This is a checkout. The branch (%s) needs to be "