/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_reference.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:15:15 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7183.
  • Revision ID: jelmer@jelmer.uk-20181116231515-zqd2yn6kj8lfydyp
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
class TestReference(TestCaseWithTransport):
28
28
 
29
29
    def get_default_format(self):
30
 
        format = controldir.format_registry.make_controldir('1.9')
31
 
        format.set_branch_format(_mod_bzrbranch.BzrBranchFormat8())
32
 
        return format
 
30
        return controldir.format_registry.make_controldir('development-subtree')
33
31
 
34
32
    def test_no_args_lists(self):
35
33
        branch = self.make_branch('branch')
44
42
        tree = self.make_branch_and_tree('tree')
45
43
        self.build_tree(['tree/newpath'])
46
44
        tree.add('newpath', b'file-id')
47
 
        tree.branch.set_reference_info('newpath', 'http://example.org', b'file-id')
 
45
        tree.branch.set_reference_info(
 
46
            'newpath', 'http://example.org', b'file-id')
48
47
        tree.branch.set_reference_info('lath', 'http://example.org/2',
49
 
                b'file-id2')
 
48
                                       b'file-id2')
50
49
        return tree
51
50
 
52
51
    def test_uses_working_tree_location(self):
87
86
        out, err = self.run_bzr('reference file http://example.org',
88
87
                                working_dir='tree', retcode=3)
89
88
        self.assertEqual('brz: ERROR: file is not versioned.\n', err)
 
89
 
 
90
    def test_missing_file_forced(self):
 
91
        tree = self.make_branch_and_tree('tree')
 
92
        out, err = self.run_bzr(
 
93
            'reference --force-unversioned file http://example.org',
 
94
            working_dir='tree')
 
95
        location, file_id = tree.branch.get_reference_info('file')
 
96
        self.assertEqual('http://example.org', location)
 
97
        self.assertEqual('', out)
 
98
        self.assertEqual('', err)