=== modified file 'bzrlib/bzrdir.py' --- bzrlib/bzrdir.py 2009-09-24 04:10:39 +0000 +++ bzrlib/bzrdir.py 2009-09-26 10:05:44 +0000 @@ -1835,6 +1835,10 @@ try: return klass._formats[format_string] except KeyError: + if len(format_string.splitlines()) > 1: + # the hg web frontend will return a full HTML page without a + # 404, even for non-existing files. + raise errors.NotBranchError(path=transport.base) raise errors.UnknownFormatError(format=format_string, kind='bzrdir') @classmethod