514
514
self.assertTransitionFromBasisToShape(basis_shape, old_revid,
515
515
new_shape, new_revid)
517
def test_parent_deleted_child_renamed(self):
518
# test a A->None and A/B->A.
519
old_revid = 'old-parent'
520
basis_shape = Inventory(root_id=None)
521
self.add_dir(basis_shape, old_revid, 'root-id', None, '')
522
self.add_dir(basis_shape, old_revid, 'dir-id-A', 'root-id', 'A')
523
self.add_dir(basis_shape, old_revid, 'dir-id-B', 'dir-id-A', 'B')
524
self.add_link(basis_shape, old_revid, 'link-id-C', 'dir-id-B', 'C', 'C')
525
new_revid = 'new-parent'
526
new_shape = Inventory(root_id=None)
527
self.add_new_root(new_shape, old_revid, new_revid)
528
self.add_dir(new_shape, new_revid, 'dir-id-B', 'root-id', 'A')
529
self.add_link(new_shape, old_revid, 'link-id-C', 'dir-id-B', 'C', 'C')
530
self.assertTransitionFromBasisToShape(basis_shape, old_revid,
531
new_shape, new_revid)
533
def test_dir_to_root(self):
535
old_revid = 'old-parent'
536
basis_shape = Inventory(root_id=None)
537
self.add_dir(basis_shape, old_revid, 'root-id', None, '')
538
self.add_dir(basis_shape, old_revid, 'dir-id-A', 'root-id', 'A')
539
self.add_link(basis_shape, old_revid, 'link-id-B', 'dir-id-A', 'B', 'B')
540
new_revid = 'new-parent'
541
new_shape = Inventory(root_id=None)
542
self.add_dir(new_shape, new_revid, 'dir-id-A', None, '')
543
self.add_link(new_shape, old_revid, 'link-id-B', 'dir-id-A', 'B', 'B')
544
self.assertTransitionFromBasisToShape(basis_shape, old_revid,
545
new_shape, new_revid)
517
547
def test_path_swap(self):
518
548
# test a A->B and B->A path swap.
519
549
old_revid = 'old-parent'