~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

merged 376388 related changes for 2.0 patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
        self._write_config_file()
511
511
 
512
512
    def _write_config_file(self):
513
 
        f = open(self._get_filename(), 'wb')
 
513
        path = self._get_filename()
 
514
        parent = osutils.parent_dir(path)
 
515
        f = osutils.open(path, 'wb', ownership_src = parent)
514
516
        self._get_parser().write(f)
515
517
        f.close()
516
518
 
809
811
                trace.mutter('creating config parent directory: %r', parent_dir)
810
812
            os.mkdir(parent_dir)
811
813
        trace.mutter('creating config directory: %r', path)
812
 
        os.mkdir(path)
 
814
        osutils.mkdir(path, ownership_src = osutils.parent_dir(path))
813
815
 
814
816
 
815
817
def config_dir():