169
169
"format does not support inventory deltas")
170
170
if not base.supports_tree_reference():
171
171
raise tests.TestNotApplicable("wt doesn't support nested trees")
172
# We add it as a directory, but it becomes a tree-reference
173
base.add(['subdir'], [b'subdir-id'], ['directory'])
174
subdir = self.make_branch_and_tree('base/subdir')
172
if base.has_versioned_directories():
173
# We add it as a directory, but it becomes a tree-reference
174
base.add(['subdir'], [None], ['directory'])
175
subdir = self.make_branch_and_tree('base/subdir')
177
subdir = self.make_branch_and_tree('base/subdir')
179
# We add it as a directory, but it becomes a tree-reference
180
base.add(['subdir'], [None], ['tree-reference'])
175
181
self.addCleanup(base.lock_read().unlock)
176
182
# Note: we aren't strict about ie.kind being 'directory' here, what we
177
183
# are strict about is that wt.inventory should match
178
184
# wt.current_dirstate()'s idea about what files are where.
179
ie = base.inventory[b'subdir-id']
180
self.assertEqual('directory', ie.kind)
181
185
path, ie = next(base.iter_entries_by_dir(specific_files=['subdir']))
182
186
self.assertEqual('subdir', path)
183
187
self.assertEqual('tree-reference', ie.kind)