28
29
def __init__(self, url, format=None):
30
31
self.bzrdir = BzrDir.open_unsupported(url)
34
32
if isinstance(self.bzrdir, RemoteBzrDir):
35
33
self.bzrdir._ensure_real()
36
34
self.bzrdir = self.bzrdir._real_bzrdir
37
35
if self.bzrdir.root_transport.is_readonly():
38
36
raise errors.UpgradeReadonly
39
37
self.transport = self.bzrdir.root_transport
49
46
branch = self.bzrdir.open_branch()
55
53
except (errors.NotBranchError, errors.IncompatibleRepositories):
56
54
# might not be a format we can open without upgrading; see e.g.