42
51
format_string = transport.get_bytes(".bzr/branch-format")
43
52
except errors.NoSuchFile:
44
53
raise errors.NotBranchError(path=transport.base)
46
61
first_line = format_string[:format_string.index(b"\n") + 1]
48
63
first_line = format_string
50
69
cls = klass.formats.get(first_line)
52
71
if first_line.endswith(b"\r\n"):
55
74
raise errors.UnknownFormatError(
56
75
format=first_line, kind='bzrdir')