~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

 * The internal storage of history, and logical branch identity have now
   been split into Branch, and Repository. The common locking and file 
   management routines are now in bzrlib.lockablefiles. 
   (Aaron Bentley, Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        This is looked up in the email controlfile for the branch.
380
380
        """
381
381
        try:
382
 
            return (self.branch.controlfile("email", "r") 
 
382
            return (self.branch.control_files.get_utf8("email") 
383
383
                    .read()
384
384
                    .decode(bzrlib.user_encoding)
385
385
                    .rstrip("\r\n"))
520
520
 
521
521
    def _get_config(self):
522
522
        try:
523
 
            obj = ConfigObj(self.branch.controlfile('branch.conf',
524
 
                                                    'rb').readlines())
 
523
            obj = ConfigObj(self.branch.control_files.get('branch.conf'
 
524
                        ).readlines())
525
525
            obj.decode('UTF-8')
526
526
        except errors.NoSuchFile:
527
527
            obj = ConfigObj()
558
558
            cfg_obj.encode('UTF-8')
559
559
            out_file = StringIO(''.join([l+'\n' for l in cfg_obj.write()]))
560
560
            out_file.seek(0)
561
 
            self.branch.put_controlfile('branch.conf', out_file, encode=False)
 
561
            self.branch.control_files.put('branch.conf', out_file)
562
562
        finally:
563
563
            self.branch.unlock()