~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Daniel Watkins
  • Date: 2008-07-03 07:06:24 UTC
  • mto: (3519.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3521.
  • Revision ID: d.m.watkins@warwick.ac.uk-20080703070624-ec2e2wpettstd7vu
Further tweaks as requested on-list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
857
857
        relpath is the portion of the path that is contained by the innermost
858
858
        BzrDir.
859
859
 
860
 
        If no tree, branch or repository is found, a NotVersionedError is
861
 
        raised.
 
860
        If no tree, branch or repository is found, a NotBranchError is raised.
862
861
        """
863
862
        bzrdir, relpath = klass.open_containing(location)
864
863
        try:
865
864
            tree, branch = bzrdir._get_tree_branch()
866
865
        except errors.NotBranchError:
867
866
            try:
868
 
                repo = klass.open_containing(location)[0].find_repository()
 
867
                repo = bzrdir.find_repository()
869
868
                return None, None, repo, relpath
870
869
            except (errors.NoRepositoryPresent):
871
870
                raise errors.NotBranchError(location)