~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-29 16:21:13 UTC
  • mfrom: (5325 +trunk)
  • mto: (5247.1.12 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100629162113-xa6y33u17mfi024v
Merge bzr.dev into cleanup resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
375
375
            recurse = True
376
376
            try:
377
377
                bzrdir = BzrDir.open_from_transport(current_transport)
378
 
            except errors.NotBranchError:
 
378
            except (errors.NotBranchError, errors.PermissionDenied):
379
379
                pass
380
380
            else:
381
381
                recurse, value = evaluate(bzrdir)
382
382
                yield value
383
383
            try:
384
384
                subdirs = list_current(current_transport)
385
 
            except errors.NoSuchFile:
 
385
            except (errors.NoSuchFile, errors.PermissionDenied):
386
386
                continue
387
387
            if recurse:
388
388
                for subdir in sorted(subdirs, reverse=True):
394
394
        """
395
395
        try:
396
396
            return [self.open_branch()]
397
 
        except errors.NotBranchError:
 
397
        except (errors.NotBranchError, errors.NoRepositoryPresent):
398
398
            return []
399
399
 
400
400
    @staticmethod
1244
1244
        repository_policy = result.determine_repository_policy(
1245
1245
            force_new_repo, stacked_branch_url, require_stacking=stacked)
1246
1246
        result_repo, is_new_repo = repository_policy.acquire_repository()
1247
 
        if is_new_repo and revision_id is not None and not stacked:
 
1247
        is_stacked = stacked or (len(result_repo._fallback_repositories) != 0)
 
1248
        if is_new_repo and revision_id is not None and not is_stacked:
1248
1249
            fetch_spec = graph.PendingAncestryResult(
1249
1250
                [revision_id], source_repository)
1250
1251
        else:
1958
1959
            format_string = transport.get_bytes(".bzr/branch-format")
1959
1960
        except errors.NoSuchFile:
1960
1961
            raise errors.NotBranchError(path=transport.base)
1961
 
 
1962
1962
        try:
1963
1963
            return klass._formats[format_string]
1964
1964
        except KeyError: