/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import stat
20
20
 
21
21
from breezy import (
 
22
    bzr,
22
23
    controldir,
23
24
    lockable_files,
24
25
    ui,
130
131
 
131
132
    def test_upgrade_control_dir(self):
132
133
        old_format = OldBzrDirFormat()
133
 
        self.addCleanup(bzrdir.BzrProber.formats.remove,
 
134
        self.addCleanup(bzr.BzrProber.formats.remove,
134
135
            old_format.get_format_string())
135
 
        bzrdir.BzrProber.formats.register(old_format.get_format_string(),
 
136
        bzr.BzrProber.formats.register(old_format.get_format_string(),
136
137
            old_format)
137
138
        self.addCleanup(controldir.ControlDirFormat._set_default_format,
138
139
                        controldir.ControlDirFormat.get_default_format())
278
279
 
279
280
    def test_recommend_upgrade_wt4(self):
280
281
        # using a deprecated format gives a warning
281
 
        self.run_bzr('init --knit a')
 
282
        self.run_bzr('init --format=knit a')
282
283
        out, err = self.run_bzr('status a')
283
284
        self.assertContainsRe(err, 'brz upgrade .*[/\\\\]a')
284
285
 
286
287
        # we should only get a recommendation to upgrade when we're accessing
287
288
        # the actual workingtree, not when we only open a bzrdir that contains
288
289
        # an old workngtree
289
 
        self.run_bzr('init --knit a')
 
290
        self.run_bzr('init --format=knit a')
290
291
        out, err = self.run_bzr('revno a')
291
292
        if err.find('upgrade') > -1:
292
293
            self.fail("message shouldn't suggest upgrade:\n%s" % err)