~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_upgrade.py

  • Committer: Marius Kruger
  • Date: 2007-06-27 18:48:10 UTC
  • mfrom: (2557 +trunk)
  • mto: (2605.1.1 rm-renamed)
  • mto: This revision was merged to the branch mainline in revision 2609.
  • Revision ID: marius.kruger@enerweb.co.za-20070627184810-4jq1y5f20xafow9w
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        bzrdir.BzrDirFormat._set_default_format(self.old_format)
62
62
 
63
63
    def test_readonly_url_error(self):
64
 
        (out, err) = self.run_bzr_captured(
65
 
            ['upgrade', self.get_readonly_url('format_5_branch')], 3)
 
64
        (out, err) = self.run_bzr(
 
65
            ['upgrade', self.get_readonly_url('format_5_branch')], retcode=3)
66
66
        self.assertEqual(out, "")
67
67
        self.assertEqual(err, "bzr: ERROR: Upgrade URL cannot work with readonly URLs.\n")
68
68
 
69
69
    def test_upgrade_up_to_date(self):
70
70
        # when up to date we should get a message to that effect
71
 
        (out, err) = self.run_bzr_captured(
72
 
            ['upgrade', 'current_format_branch'], 3)
 
71
        (out, err) = self.run_bzr(
 
72
            ['upgrade', 'current_format_branch'], retcode=3)
73
73
        self.assertEqual("", out)
74
74
        self.assertEqualDiff("bzr: ERROR: The branch format Bazaar-NG meta "
75
75
                             "directory, format 1 is already at the most "
79
79
        # when upgrading a checkout, the branch location and a suggestion
80
80
        # to upgrade it should be emitted even if the checkout is up to 
81
81
        # date
82
 
        (out, err) = self.run_bzr_captured(
83
 
            ['upgrade', 'current_format_checkout'], 3)
 
82
        (out, err) = self.run_bzr(
 
83
            ['upgrade', 'current_format_checkout'], retcode=3)
84
84
        self.assertEqual("This is a checkout. The branch (%s) needs to be "
85
85
                         "upgraded separately.\n" 
86
86
                         % get_transport(self.get_url('current_format_branch')).base,
107
107
        url = get_transport(self.get_url('format_5_branch')).base
108
108
        # check --format takes effect
109
109
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
110
 
        (out, err) = self.run_bzr_captured(
 
110
        (out, err) = self.run_bzr(
111
111
            ['upgrade', '--format=metaweave', url])
112
112
        self.assertEqualDiff("""starting upgrade of %s
113
113
making backup of tree history
131
131
        url = get_transport(self.get_url('metadir_weave_branch')).base
132
132
        # check --format takes effect
133
133
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
134
 
        (out, err) = self.run_bzr_captured(
 
134
        (out, err) = self.run_bzr(
135
135
            ['upgrade', '--format=knit', url])
136
136
        self.assertEqualDiff("""starting upgrade of %s
137
137
making backup of tree history