~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Added execute bit to new_file method

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
            self.version_file(file_id, trans_id)
345
345
        return trans_id
346
346
 
347
 
    def new_file(self, name, parent_id, contents, file_id=None):
 
347
    def new_file(self, name, parent_id, contents, file_id=None, 
 
348
                 executable=None):
348
349
        """\
349
350
        Convenience method to create files.
350
351
        
356
357
        """
357
358
        trans_id = self._new_entry(name, parent_id, file_id)
358
359
        self.create_file(contents, trans_id)
 
360
        if executable is not None:
 
361
            self.set_executability(executable, trans_id)
359
362
        return trans_id
360
363
 
361
364
    def new_directory(self, name, parent_id, file_id=None):