~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

(jam) Switch from Transport.get() to .get_bytes(),
        close open file handles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1440
1440
        """Return the format for the branch object in a_bzrdir."""
1441
1441
        try:
1442
1442
            transport = a_bzrdir.get_branch_transport(None)
1443
 
            format_string = transport.get("format").read()
 
1443
            format_string = transport.get_bytes("format")
1444
1444
            return klass._formats[format_string]
1445
1445
        except errors.NoSuchFile:
1446
1446
            raise errors.NotBranchError(path=transport.base)
1979
1979
    def get_reference(self, a_bzrdir):
1980
1980
        """See BranchFormat.get_reference()."""
1981
1981
        transport = a_bzrdir.get_branch_transport(None)
1982
 
        return transport.get('location').read()
 
1982
        return transport.get_bytes('location')
1983
1983
 
1984
1984
    def set_reference(self, a_bzrdir, to_branch):
1985
1985
        """See BranchFormat.set_reference()."""