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))
2016
2023
class TestTransformPreview(tests.TestCaseWithTransport):
2018
2025
def create_tree(self):
2090
2097
(False, False))],
2091
2098
list(preview_tree.iter_changes(revision_tree)))
2093
def test_include_unchanged_value_error(self):
2100
def test_include_unchanged_succeeds(self):
2094
2101
revision_tree, preview_tree = self.get_tree_and_preview_tree()
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))
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))
2099
2108
def test_specific_files(self):
2100
2109
revision_tree, preview_tree = self.get_tree_and_preview_tree()
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))
2110
changes = preview_tree.iter_changes(revision_tree,
2111
specific_files=[''])
2112
self.assertEqual([ROOT_ENTRY, A_ENTRY], list(changes))
2105
def test_want_unversioned_value_error(self):
2114
def test_want_unversioned(self):
2106
2115
revision_tree, preview_tree = self.get_tree_and_preview_tree()
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))
2116
changes = preview_tree.iter_changes(revision_tree,
2117
want_unversioned=True)
2118
self.assertEqual([ROOT_ENTRY, A_ENTRY], list(changes))
2111
2120
def test_ignore_extra_trees_no_specific_files(self):
2112
2121
# extra_trees is harmless without specific_files, so we'll silently