~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
541
541
        self.assertTrue(wt.is_executable('soc'))
542
542
        self.assertTrue(wt.is_executable('sac'))
543
543
 
 
544
    def test_preserve_mode(self):
 
545
        """File mode is preserved when replacing content"""
 
546
        if sys.platform == 'win32':
 
547
            raise TestSkipped('chmod has no effect on win32')
 
548
        transform, root = self.get_transform()
 
549
        transform.new_file('file1', root, 'contents', 'file1-id', True)
 
550
        transform.apply()
 
551
        self.assertTrue(self.wt.is_executable('file1-id'))
 
552
        transform, root = self.get_transform()
 
553
        file1_id = transform.trans_id_tree_file_id('file1-id')
 
554
        transform.delete_contents(file1_id)
 
555
        transform.create_file('contents2', file1_id)
 
556
        transform.apply()
 
557
        self.assertTrue(self.wt.is_executable('file1-id'))
 
558
 
544
559
    def test__set_mode_stats_correctly(self):
545
560
        """_set_mode stats to determine file mode."""
546
561
        if sys.platform == 'win32':