~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Robert Collins
  • Date: 2006-06-09 09:18:56 UTC
  • mfrom: (1725.2.9 commit)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: robertc@robertcollins.net-20060609091856-2f9fc48998d655a9
(robertc, ab)Merge some commit and fetch tuning steps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
            pass
345
345
        next_transport = self.root_transport.clone('..')
346
346
        while True:
 
347
            # find the next containing bzrdir
347
348
            try:
348
349
                found_bzrdir = BzrDir.open_containing_from_transport(
349
350
                    next_transport)[0]
350
351
            except errors.NotBranchError:
 
352
                # none found
351
353
                raise errors.NoRepositoryPresent(self)
 
354
            # does it have a repository ?
352
355
            try:
353
356
                repository = found_bzrdir.open_repository()
354
357
            except errors.NoRepositoryPresent:
355
358
                next_transport = found_bzrdir.root_transport.clone('..')
356
 
                continue
 
359
                if (found_bzrdir.root_transport.base == next_transport.base):
 
360
                    # top of the file system
 
361
                    break
 
362
                else:
 
363
                    continue
357
364
            if ((found_bzrdir.root_transport.base == 
358
365
                 self.root_transport.base) or repository.is_shared()):
359
366
                return repository