~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

Added execute bit to new_file method

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        try:
59
59
            root = transform.get_id_tree(wt.get_root_id())
60
60
            trans_id = transform.new_file('name', root, 'contents', 
61
 
                                          'my_pretties')
 
61
                                          'my_pretties', True)
62
62
            oz = transform.new_directory('oz', root, 'oz-id')
63
63
            dorothy = transform.new_directory('dorothy', oz, 'dorothy-id')
64
64
            toto = transform.new_file('toto', dorothy, 'toto-contents', 
65
 
                                      'toto-id')
 
65
                                      'toto-id', False)
66
66
            wizard = transform.new_symlink('wizard', oz, 'wizard-target', 
67
67
                                           'wizard-id')
68
68
            transform.apply()
69
69
            self.assertEqual(len(transform.find_conflicts()), 0)
70
70
            self.assertEqual('contents', file('name').read())
71
71
            self.assertEqual(wt.path2id('name'), 'my_pretties')
 
72
            self.assertIs(wt.is_executable('my_pretties'), True)
72
73
            self.assertEqual(wt.path2id('oz'), 'oz-id')
73
74
            self.assertEqual(wt.path2id('oz/dorothy'), 'dorothy-id')
74
75
            self.assertEqual(wt.path2id('oz/dorothy/toto'), 'toto-id')
75
76
            self.assertEqual(wt.path2id('oz/wizard'), 'wizard-id')
76
77
            self.assertEqual('toto-contents', file('oz/dorothy/toto').read())
 
78
            self.assertIs(wt.is_executable('toto-id'), False)
77
79
            self.assertEqual(os.readlink('oz/wizard'), 'wizard-target')
78
80
        finally:
79
81
            transform.finalize()