206
206
self.do_test_fetch_to_rich_root_sets_parents_correctly(
207
207
(('my-root', 'origin'),),
208
208
[('origin', None, [('add', ('', ROOT_ID, 'directory', '')),
209
('add', ('child', 'my-root', 'directory', ''))]),
209
('add', ('child', b'my-root', 'directory', ''))]),
210
210
('base', None, []),
211
211
('tip', None, [('unversion', 'child'),
212
212
('unversion', ''),
214
('add', ('', 'my-root', 'directory', '')),
214
('add', ('', b'my-root', 'directory', '')),
216
], root_id='my-root')
216
], root_id=b'my-root')
218
218
def test_fetch_to_rich_root_set_parent_2_parent_1_different_id_gone(self):
219
219
# 2 parents, 1 different fileid, our second missing -> 1 parent
220
220
self.do_test_fetch_to_rich_root_sets_parents_correctly(
221
(('my-root', 'right'),),
221
((b'my-root', 'right'),),
222
222
[('base', None, [('add', ('', ROOT_ID, 'directory', ''))]),
223
223
('right', None, [('unversion', ''),
224
('add', ('', 'my-root', 'directory', ''))]),
224
('add', ('', b'my-root', 'directory', ''))]),
225
225
('tip', ['base', 'right'], [('unversion', ''),
226
('add', ('', 'my-root', 'directory', '')),
226
('add', ('', b'my-root', 'directory', '')),
228
], root_id='my-root')
228
], root_id=b'my-root')
230
230
def test_fetch_to_rich_root_set_parent_2_parent_2_different_id_moved(self):
231
231
# 2 parents, 1 different fileid, our second moved -> 2 parent
232
232
# (and that parent honours the changing revid of the other location)
233
233
self.do_test_fetch_to_rich_root_sets_parents_correctly(
234
(('my-root', 'right'),),
234
((b'my-root', 'right'),),
235
235
# 'my-root' at 'child'.
236
236
[('origin', None, [('add', ('', ROOT_ID, 'directory', '')),
237
('add', ('child', 'my-root', 'directory', ''))]),
237
('add', ('child', b'my-root', 'directory', ''))]),
238
238
('base', None, []),
239
239
# 'my-root' at root
240
240
('right', None, [('unversion', 'child'),
241
241
('unversion', ''),
243
('add', ('', 'my-root', 'directory', ''))]),
243
('add', ('', b'my-root', 'directory', ''))]),
244
244
('tip', ['base', 'right'], [('unversion', ''),
245
245
('unversion', 'child'),
247
('add', ('', 'my-root', 'directory', '')),
247
('add', ('', b'my-root', 'directory', '')),
249
], root_id='my-root')
249
], root_id=b'my-root')
251
251
def test_fetch_all_from_self(self):
252
252
tree = self.make_branch_and_tree('.')