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
42
49
branch = self.bzrdir.open_branch()
45
51
ui.ui_factory.note("This is a checkout. The branch (%s) needs to be "
49
55
except (errors.NotBranchError, errors.IncompatibleRepositories):
50
56
# might not be a format we can open without upgrading; see e.g.