158
158
return self.workingtree_to_test_tree(tree)
160
def get_tree_with_subdirs_and_all_content_types(self):
161
"""Return a test tree with subdirs and all content types.
163
The returned tree has the following inventory:
164
[('', inventory.ROOT_ID),
166
('1top-dir', '1top-dir'),
167
(u'2utf\u1234file', u'0utf\u1234file'),
168
('symlink', 'symlink'),
169
('1top-dir/0file-in-1topdir', '1file-in-1topdir'),
170
('1top-dir/1dir-in-1topdir', '0dir-in-1topdir')]
171
where each component has the type of its name - i.e. '1file..' is afile.
173
note that the order of the paths and fileids is deliberately
174
mismatched to ensure that the result order is path based.
176
tree = self.make_branch_and_tree('.')
180
'1top-dir/0file-in-1topdir',
181
'1top-dir/1dir-in-1topdir/'
190
self.build_tree(paths)
192
tt = transform.TreeTransform(tree)
193
root_transaction_id = tt.trans_id_tree_path('')
194
tt.new_symlink('symlink',
195
root_transaction_id, 'link-target', 'symlink')
197
return self.workingtree_to_test_tree(tree)
161
200
class TreeTestProviderAdapter(WorkingTreeTestProviderAdapter):
162
201
"""Generate test suites for each Tree implementation in bzrlib.