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