/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Martin Pool
  • Date: 2010-04-30 07:24:15 UTC
  • mto: This revision was merged to the branch mainline in revision 5228.
  • Revision ID: mbp@sourcefrog.net-20100430072415-3m4gtc1rb4qzuufa
Add failing specific test for 491763

Show diffs side-by-side

added added

removed removed

Lines of Context:
830
830
        rename.set_executability(True, myfile)
831
831
        rename.apply()
832
832
 
 
833
    def test_rename_fails(self):
 
834
        # see https://bugs.launchpad.net/bzr/+bug/491763
 
835
        create, root_id = self.get_transform()
 
836
        first_dir = create.new_directory('first-dir', root_id, 'first-id')
 
837
        myfile = create.new_file('myfile', root_id, 'myfile-text',
 
838
                                 'myfile-id')
 
839
        create.apply()
 
840
        # make the file and directory readonly in the hope this will prevent
 
841
        # renames
 
842
        osutils.make_readonly(self.wt.abspath('first-dir'))
 
843
        osutils.make_readonly(self.wt.abspath('myfile'))
 
844
        # now transform to rename
 
845
        rename_transform, root_id = self.get_transform()
 
846
        file_trans_id = rename_transform.trans_id_file_id('myfile-id')
 
847
        dir_id = rename_transform.trans_id_file_id('first-id')
 
848
        rename_transform.adjust_path('newname', dir_id, file_trans_id)
 
849
        rename_transform.apply()
 
850
 
833
851
    def test_set_executability_order(self):
834
852
        """Ensure that executability behaves the same, no matter what order.
835
853