~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Martin Pool
  • Date: 2010-07-17 16:36:00 UTC
  • mfrom: (5050.3.9 2.2)
  • mto: (5050.3.10 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: mbp@canonical.com-20100717163600-jaw27ncuhkhkz8sy
merge news from 2.2b4

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
 
75
75
import bzrlib
76
76
from bzrlib import (
 
77
    atomicfile,
77
78
    debug,
78
79
    errors,
79
80
    mail_client,
478
479
        return self.get_user_option('nickname')
479
480
 
480
481
    def _write_config_file(self):
481
 
        f = file(self._get_filename(), "wb")
482
 
        try:
483
 
            osutils.copy_ownership_from_path(f.name)
484
 
            self._get_parser().write(f)
485
 
        finally:
486
 
            f.close()
 
482
        atomic_file = atomicfile.AtomicFile(self._get_filename())
 
483
        self._get_parser().write(atomic_file)
 
484
        atomic_file.commit()
 
485
        atomic_file.close()
487
486
 
488
487
 
489
488
class GlobalConfig(IniBasedConfig):