~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 19:26:45 UTC
  • mto: (4634.52.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4716.
  • Revision ID: john@arbash-meinel.com-20090924192645-hyy1ycnnk6u3j5j6
Catch a corner case that we were missing.
The CHKInventory tests were passing, but failed for test_inv because
we were passing None to _getitems(). That only failed for InternalNodes,
but we were using a structure that didn't have internal nodes.
So now the test is parameterized on a small CHKInventory page size
to force those things out into the open.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
            branch = self.bzrdir.open_branch()
47
47
            if branch.bzrdir.root_transport.base != \
48
48
                self.bzrdir.root_transport.base:
49
 
                ui.ui_factory.note("This is a checkout. The branch (%s) needs to be "
50
 
                             "upgraded separately." %
 
49
                self.pb.note("This is a checkout. The branch (%s) needs to be "
 
50
                             "upgraded separately.",
51
51
                             branch.bzrdir.root_transport.base)
52
52
            del branch
53
53
        except (errors.NotBranchError, errors.IncompatibleRepositories):
72
72
            raise errors.BzrError("cannot upgrade from bzrdir format %s" %
73
73
                           self.bzrdir._format)
74
74
        self.bzrdir.check_conversion_target(format)
75
 
        ui.ui_factory.note('starting upgrade of %s' % self.transport.base)
76
 
 
 
75
        self.pb.note('starting upgrade of %s', self.transport.base)
77
76
        self.bzrdir.backup_bzrdir()
78
77
        while self.bzrdir.needs_format_conversion(format):
79
78
            converter = self.bzrdir._format.get_converter(format)
80
79
            self.bzrdir = converter.convert(self.bzrdir, self.pb)
81
 
        ui.ui_factory.note("finished")
 
80
        self.pb.note("finished")
82
81
 
83
82
 
84
83
def upgrade(url, format=None):