/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-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
    def test_no_args_lists(self):
35
35
        branch = self.make_branch('branch')
36
 
        branch.set_reference_info('path', 'http://example.org', b'file-id')
37
 
        branch.set_reference_info('lath', 'http://example.org/2', b'file-id2')
 
36
        branch.set_reference_info('file-id', 'path', 'http://example.org')
 
37
        branch.set_reference_info('file-id2', 'lath', 'http://example.org/2')
38
38
        out, err = self.run_bzr('reference', working_dir='branch')
39
39
        lines = out.splitlines()
40
40
        self.assertEqual('lath http://example.org/2', lines[0])
43
43
    def make_tree_with_reference(self):
44
44
        tree = self.make_branch_and_tree('tree')
45
45
        self.build_tree(['tree/newpath'])
46
 
        tree.add('newpath', b'file-id')
47
 
        tree.branch.set_reference_info('newpath', 'http://example.org', b'file-id')
48
 
        tree.branch.set_reference_info('lath', 'http://example.org/2',
49
 
                b'file-id2')
 
46
        tree.add('newpath', 'file-id')
 
47
        tree.branch.set_reference_info('file-id', 'path', 'http://example.org')
 
48
        tree.branch.set_reference_info('file-id2', 'lath',
 
49
                                       'http://example.org/2')
50
50
        return tree
51
51
 
52
52
    def test_uses_working_tree_location(self):
74
74
    def test_two_args_sets(self):
75
75
        tree = self.make_branch_and_tree('tree')
76
76
        self.build_tree(['tree/file'])
77
 
        tree.add('file', b'file-id')
 
77
        tree.add('file', 'file-id')
78
78
        out, err = self.run_bzr('reference tree/file http://example.org')
79
 
        location, file_id = tree.branch.get_reference_info('file')
 
79
        path, location = tree.branch.get_reference_info('file-id')
80
80
        self.assertEqual('http://example.org', location)
81
 
        self.assertEqual(b'file-id', file_id)
 
81
        self.assertEqual('file', path)
82
82
        self.assertEqual('', out)
83
83
        self.assertEqual('', err)
84
84