~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

Disable inheritance for getting at LockableFiles, rather use composition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
381
381
        This is looked up in the email controlfile for the branch.
382
382
        """
383
383
        try:
384
 
            return (self.branch.controlfile("email", "r") 
 
384
            return (self.branch.control_files.controlfile("email", "r") 
385
385
                    .read()
386
386
                    .decode(bzrlib.user_encoding)
387
387
                    .rstrip("\r\n"))
491
491
 
492
492
    def _get_config(self):
493
493
        try:
494
 
            obj = ConfigObj(self.branch.controlfile('branch.conf',
 
494
            obj = ConfigObj(self.branch.control_files.controlfile('branch.conf',
495
495
                                                    'rb').readlines())
496
496
            obj.decode('UTF-8')
497
497
        except errors.NoSuchFile:
529
529
            cfg_obj.encode('UTF-8')
530
530
            out_file = StringIO(''.join([l+'\n' for l in cfg_obj.write()]))
531
531
            out_file.seek(0)
532
 
            self.branch.put_controlfile('branch.conf', out_file, encode=False)
 
532
            self.branch.control_files.put_controlfile('branch.conf', out_file, encode=False)
533
533
        finally:
534
534
            self.branch.unlock()