67
67
tree.commit('first')
68
68
to_tree = tree.controldir.sprout('to').open_workingtree()
69
self.assertEqual('first_root_id', to_tree.get_root_id())
69
self.assertEqual(b'first_root_id', to_tree.get_root_id())
70
70
tree.set_root_id(b'second_root_id')
71
71
tree.commit('second')
72
72
to_tree.pull(tree.branch)
73
self.assertEqual('second_root_id', to_tree.get_root_id())
73
self.assertEqual(b'second_root_id', to_tree.get_root_id())
76
76
class TestPullWithOrphans(per_workingtree.TestCaseWithWorkingTree):
84
84
# Create an empty trunk
85
85
builder.build_snapshot(None, [
86
('add', ('', 'root-id', 'directory', ''))],
86
('add', ('', b'root-id', 'directory', ''))],
88
builder.build_snapshot(['1'], [
89
('add', ('dir', 'dir-id', 'directory', '')),
90
('add', ('file', 'file-id', 'file', 'trunk content\n')),],
88
builder.build_snapshot([b'1'], [
89
('add', ('dir', b'dir-id', 'directory', '')),
90
('add', ('file', b'file-id', 'file', b'trunk content\n')),],
92
builder.build_snapshot(['2'], [
92
builder.build_snapshot([b'2'], [
93
93
('unversion', 'dir'),],
95
95
builder.finish_series()