/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/per_workingtree/test_symlinks.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        self.check_open_containing('link/content', 'tree', 'content')
142
142
        self.check_open_containing('link/sublink', 'tree', 'sublink')
143
143
        # this next one is a bit debatable, but arguably it's better that
144
 
        # open_containing is only concerned with opening the tree 
 
144
        # open_containing is only concerned with opening the tree
145
145
        # and then you can deal with symlinks along the way if you want
146
146
        self.check_open_containing('link/sublink/subcontent', 'tree',
147
 
            'sublink/subcontent')
 
147
                                   'sublink/subcontent')
148
148
 
149
149
    def check_open_containing(self, to_open, expected_tree_name,
150
 
        expected_relpath):
 
150
                              expected_relpath):
151
151
        wt, relpath = workingtree.WorkingTree.open_containing(to_open)
152
152
        self.assertEqual(relpath, expected_relpath)
153
153
        self.assertEndsWith(wt.basedir, expected_tree_name)
158
158
        # <https://bugs.launchpad.net/bzr/+bug/128562>
159
159
        self.make_test_tree()
160
160
        self.check_tree_files(['tree/outerlink'],
161
 
            'tree', ['outerlink'])
 
161
                              'tree', ['outerlink'])
162
162
        self.check_tree_files(['link/outerlink'],
163
 
            'tree', ['outerlink'])
 
163
                              'tree', ['outerlink'])
164
164
        self.check_tree_files(['link/sublink/subcontent'],
165
 
            'tree', ['subdir/subcontent'])
 
165
                              'tree', ['subdir/subcontent'])
166
166
 
167
167
    def check_tree_files(self, to_open, expected_tree, expect_paths):
168
168
        tree, relpaths = workingtree.WorkingTree.open_containing_paths(to_open)