1354
1354
self.assertEqual(expected,
1355
1355
self.do_iter_changes(tree1, tree2,
1356
1356
want_unversioned=True))
1358
def test_renamed_and_unknown(self):
1359
"""A file was moved on the filesystem, but not in bzr."""
1360
tree1 = self.make_branch_and_tree('tree1')
1361
tree2 = self.make_to_branch_and_tree('tree2')
1362
root_id = tree1.get_root_id()
1363
tree2.set_root_id(root_id)
1365
# The final changes are:
1369
self.build_tree_contents([
1370
('tree1/a', 'a contents\n'),
1371
('tree1/b', 'b contents\n'),
1372
('tree2/a', 'a contents\n'),
1373
('tree2/b', 'b contents\n'),
1375
tree1.add(['a', 'b'], ['a-id', 'b-id'])
1376
tree2.add(['a', 'b'], ['a-id', 'b-id'])
1377
os.rename('tree2/a', 'tree2/a2')
1379
tree1, tree2 = self.mutable_trees_to_locked_test_trees(tree1, tree2)
1382
self.missing('a-id', 'a', 'a', tree2.get_root_id(), 'file'),
1383
self.unversioned(tree2, 'a2'),
1385
self.assertEqual(expected,
1386
self.do_iter_changes(tree1, tree2,
1387
want_unversioned=True))