~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Parth Malwankar
  • Date: 2010-02-15 10:46:49 UTC
  • mto: This revision was merged to the branch mainline in revision 5048.
  • Revision ID: parth.malwankar@gmail.com-20100215104649-bo4z8rhqvfibnxhj
updated existing upgrade tests to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        url = get_transport(self.get_url('format_5_branch')).base
102
102
        # check --format takes effect
103
103
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
 
104
        backup_dir = 'backup.bzr.~1~'
104
105
        (out, err) = self.run_bzr(
105
106
            ['upgrade', '--format=metaweave', url])
106
107
        self.assertEqualDiff("""starting upgrade of %s
107
108
making backup of %s.bzr
108
 
  to %sbackup.bzr
 
109
  to %s%s
109
110
starting upgrade from format 5 to 6
110
111
adding prefixes to weaves
111
112
adding prefixes to revision-store
112
113
starting upgrade from format 6 to metadir
113
114
finished
114
 
""" % (url, url, url), out)
 
115
""" % (url, url, url, backup_dir), out)
115
116
        self.assertEqualDiff("", err)
116
117
        self.assertTrue(isinstance(
117
118
            bzrdir.BzrDir.open(self.get_url('format_5_branch'))._format,
124
125
        url = get_transport(self.get_url('metadir_weave_branch')).base
125
126
        # check --format takes effect
126
127
        bzrdir.BzrDirFormat._set_default_format(bzrdir.BzrDirFormat5())
 
128
        backup_dir = 'backup.bzr.~1~'
127
129
        (out, err) = self.run_bzr(
128
130
            ['upgrade', '--format=knit', url])
129
131
        self.assertEqualDiff("""starting upgrade of %s
130
132
making backup of %s.bzr
131
 
  to %sbackup.bzr
 
133
  to %s%s
132
134
starting repository conversion
133
135
repository converted
134
136
finished
135
 
""" % (url, url, url), out)
 
137
""" % (url, url, url, backup_dir), out)
136
138
        self.assertEqualDiff("", err)
137
139
        converted_dir = bzrdir.BzrDir.open(self.get_url('metadir_weave_branch'))
138
140
        self.assertTrue(isinstance(converted_dir._format,
153
155
        t = get_transport(self.get_url())
154
156
        url = t.base
155
157
        out, err = self.run_bzr(['upgrade', '--format=knit', url])
 
158
        backup_dir = 'backup.bzr.~1~'
156
159
        self.assertEqualDiff("""starting upgrade of %s
157
160
making backup of %s.bzr
158
 
  to %sbackup.bzr
 
161
  to %s%s
159
162
starting upgrade from format 6 to metadir
160
163
starting repository conversion
161
164
repository converted
162
165
finished
163
 
""" % (url, url, url), out)
 
166
""" % (url, url, url,backup_dir), out)
164
167
        self.assertEqual('', err)
165
168
 
166
169