~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2006-02-16 11:19:47 UTC
  • mto: (1534.1.24 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060216111947-e6946ac37fe8b21a
Correct buggy test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    """
32
32
 
33
33
    def note(self, fmt_string, *args, **kwargs):
34
 
        """See progress.ProgressBae.note()."""
 
34
        """See progress.ProgressBar.note()."""
35
35
        print fmt_string % args
36
36
 
37
37
    def progress_bar(self):
38
38
        return self
 
39
        
 
40
    def update(self, message, count, total):
 
41
        """See progress.ProgressBar.update()."""
39
42
 
40
43
 
41
44
class TestWithUpgradableBranches(TestCaseWithTransport):
103
106
    def test_ugrade_branch_in_repo(self):
104
107
        # upgrading a branch in a repo should warn about not upgrading the repo
105
108
        pass
 
109
 
 
110
    def test_upgrade_explicit_metaformat(self):
 
111
        # users can force an upgrade to metadir format.
 
112
        url = get_transport(self.get_url('format_5_branch')).base
 
113
        # check --format takes effect
 
114
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirFormat5())
 
115
        (out, err) = self.run_bzr_captured(
 
116
            ['upgrade', '--format=metadir', url])
 
117
        self.assertEqualDiff("""starting upgrade of %s
 
118
making backup of tree history
 
119
%s.bzr has been backed up to %s.bzr.backup
 
120
if conversion fails, you can move this directory back to .bzr
 
121
if it succeeds, you can remove this directory if you wish
 
122
starting upgrade from format 5 to 6
 
123
adding prefixes to weaves
 
124
adding prefixes to revision-store
 
125
starting upgrade from format 6 to metadir
 
126
finished
 
127
""" % (url, url, url), out)
 
128
        self.assertEqualDiff("", err)
 
129
        self.assertTrue(isinstance(
 
130
            bzrdir.BzrDir.open(self.get_url('format_5_branch'))._format,
 
131
            bzrdir.BzrDirMetaFormat1))