2013
2013
resolve_conflicts(tt)
2016
A_ENTRY = ('a-id', ('a', 'a'), True, (True, True),
2017
('TREE_ROOT', 'TREE_ROOT'), ('a', 'a'), ('file', 'file'),
2019
ROOT_ENTRY = ('TREE_ROOT', ('', ''), False, (True, True), (None, None),
2020
('', ''), ('directory', 'directory'), (False, None))
2023
2016
class TestTransformPreview(tests.TestCaseWithTransport):
2025
2018
def create_tree(self):
2097
2090
(False, False))],
2098
2091
list(preview_tree.iter_changes(revision_tree)))
2100
def test_include_unchanged_succeeds(self):
2093
def test_include_unchanged_value_error(self):
2101
2094
revision_tree, preview_tree = self.get_tree_and_preview_tree()
2102
changes = preview_tree.iter_changes(revision_tree,
2103
include_unchanged=True)
2104
root = revision_tree.inventory.root.file_id
2106
self.assertEqual([ROOT_ENTRY, A_ENTRY], list(changes))
2095
e = self.assertRaises(ValueError, preview_tree.iter_changes,
2096
revision_tree, include_unchanged=True)
2097
self.assertEqual('include_unchanged is not supported', str(e))
2108
2099
def test_specific_files(self):
2109
2100
revision_tree, preview_tree = self.get_tree_and_preview_tree()
2110
changes = preview_tree.iter_changes(revision_tree,
2111
specific_files=[''])
2112
self.assertEqual([ROOT_ENTRY, A_ENTRY], list(changes))
2101
e = self.assertRaises(ValueError, preview_tree.iter_changes,
2102
revision_tree, specific_files=['pete'])
2103
self.assertEqual('specific_files is not supported', str(e))
2114
def test_want_unversioned(self):
2105
def test_want_unversioned_value_error(self):
2115
2106
revision_tree, preview_tree = self.get_tree_and_preview_tree()
2116
changes = preview_tree.iter_changes(revision_tree,
2117
want_unversioned=True)
2118
self.assertEqual([ROOT_ENTRY, A_ENTRY], list(changes))
2107
e = self.assertRaises(ValueError, preview_tree.iter_changes,
2108
revision_tree, want_unversioned=True)
2109
self.assertEqual('want_unversioned is not supported', str(e))
2120
2111
def test_ignore_extra_trees_no_specific_files(self):
2121
2112
# extra_trees is harmless without specific_files, so we'll silently