~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

recommit of TreeTransform._iter_changes fix with missing files

Show diffs side-by-side

added added

removed removed

Lines of Context:
732
732
        finally:
733
733
            transform.finalize()
734
734
 
 
735
    def test_iter_changes_move_missing(self):
 
736
        """Test moving ids with no files around"""
 
737
        self.wt.set_root_id('toor_eert')
 
738
        # Need two steps because versioning a non-existant file is a conflict.
 
739
        transform, root = self.get_transform()
 
740
        transform.new_directory('floater', root, 'floater-id')
 
741
        transform.apply()
 
742
        transform, root = self.get_transform()
 
743
        transform.delete_contents(transform.trans_id_tree_path('floater'))
 
744
        transform.apply()
 
745
        transform, root = self.get_transform()
 
746
        floater = transform.trans_id_tree_path('floater')
 
747
        try:
 
748
            transform.adjust_path('flitter', root, floater)
 
749
            self.assertEqual([('floater-id', ('floater', 'flitter'), False,
 
750
            (True, True), ('toor_eert', 'toor_eert'), ('floater', 'flitter'),
 
751
            (None, None), (False, False))], list(transform._iter_changes()))
 
752
        finally:
 
753
            transform.finalize()
 
754
 
735
755
    def test_iter_changes_pointless(self):
736
756
        """Ensure that no-ops are not treated as modifications"""
737
757
        self.wt.set_root_id('eert_toor')