~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-22 05:01:15 UTC
  • mfrom: (1534.12.2 bzr.ttransform)
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: john@arbash-meinel.com-20060922050115-93b124532cdd0ed0
[merge] Aaron Bentley's file mode fix

Show diffs side-by-side

added added

removed removed

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