/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/config.py

  • Committer: Parth Malwankar
  • Date: 2010-07-21 03:07:02 UTC
  • mto: (5050.3.14 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: parth.malwankar@gmail.com-20100721030702-ud1x2wcs6um57fhr
copy config file ownership only if a new file is created

Show diffs side-by-side

added added

removed removed

Lines of Context:
480
480
 
481
481
    def _write_config_file(self):
482
482
        filename = self._get_filename()
 
483
        file_existed = os.path.isfile(filename)
483
484
        atomic_file = atomicfile.AtomicFile(filename)
484
485
        self._get_parser().write(atomic_file)
485
486
        atomic_file.commit()
486
487
        atomic_file.close()
487
 
        osutils.copy_ownership_from_path(filename)
 
488
        if not file_existed:
 
489
            osutils.copy_ownership_from_path(filename)
488
490
 
489
491
 
490
492
class GlobalConfig(IniBasedConfig):