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

  • Committer: Jelmer Vernooij
  • Date: 2018-05-07 11:22:07 UTC
  • mfrom: (6951 work)
  • mto: This revision was merged to the branch mainline in revision 6953.
  • Revision ID: jelmer@jelmer.uk-20180507112207-x3kqvmjdzfvmfk2p
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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')
 
176
        else:
 
177
            subdir = self.make_branch_and_tree('base/subdir')
 
178
            subdir.commit('')
 
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)