~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Martin Pool
  • Date: 2008-05-22 05:48:22 UTC
  • mfrom: (3407.2.16 controlfiles)
  • mto: This revision was merged to the branch mainline in revision 3448.
  • Revision ID: mbp@sourcefrog.net-20080522054822-lrq17tx62wbfzj8r
merge further LockableFile deprecations

Show diffs side-by-side

added added

removed removed

Lines of Context:
641
641
    def _get_user_id(self):
642
642
        """Return the full user id for the branch.
643
643
    
644
 
        e.g. "John Hacker <jhacker@foo.org>"
 
644
        e.g. "John Hacker <jhacker@example.com>"
645
645
        This is looked up in the email controlfile for the branch.
646
646
        """
647
647
        try:
648
 
            return (self.branch.control_files._transport.get_bytes("email")
 
648
            return (self.branch._transport.get_bytes("email")
649
649
                    .decode(bzrlib.user_encoding)
650
650
                    .rstrip("\r\n"))
651
651
        except errors.NoSuchFile, e:
895
895
    # XXX: Really needs a better name, as this is not part of the tree! -- mbp 20080507
896
896
 
897
897
    def __init__(self, branch):
898
 
        transport = branch.control_files._transport
899
 
        self._config = TransportConfig(transport, 'branch.conf')
 
898
        # XXX: Really this should be asking the branch for its configuration
 
899
        # data, rather than relying on a Transport, so that it can work 
 
900
        # more cleanly with a RemoteBranch that has no transport.
 
901
        self._config = TransportConfig(branch._transport, 'branch.conf')
900
902
        self.branch = branch
901
903
 
902
904
    def _get_parser(self, file=None):