28
28
def __init__(self, url, format=None):
30
30
self.bzrdir = BzrDir.open_unsupported(url)
31
34
if isinstance(self.bzrdir, RemoteBzrDir):
32
35
self.bzrdir._ensure_real()
33
36
self.bzrdir = self.bzrdir._real_bzrdir
34
37
if self.bzrdir.root_transport.is_readonly():
35
38
raise errors.UpgradeReadonly
36
39
self.transport = self.bzrdir.root_transport
41
49
branch = self.bzrdir.open_branch()
44
51
ui.ui_factory.note("This is a checkout. The branch (%s) needs to be "
48
55
except (errors.NotBranchError, errors.IncompatibleRepositories):
49
56
# might not be a format we can open without upgrading; see e.g.