103
103
entry = get_entry(self.tree, self.tree.path2id('symlink'))
104
104
self.assertEqual(entry.kind, 'symlink')
105
105
self.assertEqual(None, entry.text_size)
107
def test_paths2ids_recursive(self):
108
work_tree = self.make_branch_and_tree('tree')
109
self.build_tree(['tree/dir/', 'tree/dir/file'])
110
work_tree.add(['dir', 'dir/file'], ['dir-id', 'file-id'])
111
tree = self._convert_tree(work_tree)
113
self.addCleanup(tree.unlock)
114
self.assertEqual(set(['dir-id', 'file-id']), tree.paths2ids(['dir']))
116
def test_paths2ids_forget_old(self):
117
work_tree = self.make_branch_and_tree('tree')
118
self.build_tree(['tree/file'])
119
work_tree.add('file', 'first-id')
120
work_tree.commit('commit old state')
121
work_tree.remove('file')
122
tree = self._convert_tree(work_tree)
124
self.addCleanup(tree.unlock)
125
self.assertEqual(set([]), tree.paths2ids(['file'],
126
require_versioned=False))