~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-11 02:07:30 UTC
  • mto: This revision was merged to the branch mainline in revision 4965.
  • Revision ID: andrew.bennetts@canonical.com-20100111020730-1dctpvfgburfrgkk
Defer checking for a repository in NotBranchError case until we format the error as a string. (test_smart currently fails)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1449
1449
            format_string = transport.get_bytes("format")
1450
1450
            return klass._formats[format_string]
1451
1451
        except errors.NoSuchFile:
1452
 
            raise errors.NotBranchError(path=transport.base)
 
1452
            raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
1453
1453
        except KeyError:
1454
1454
            raise errors.UnknownFormatError(format=format_string, kind='branch')
1455
1455
 
1804
1804
                              _repository=a_bzrdir.find_repository(),
1805
1805
                              ignore_fallbacks=ignore_fallbacks)
1806
1806
        except errors.NoSuchFile:
1807
 
            raise errors.NotBranchError(path=transport.base)
 
1807
            raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
1808
1808
 
1809
1809
    def __init__(self):
1810
1810
        super(BranchFormatMetadir, self).__init__()