~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-06 15:33:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080206153312-qycs7u05d7fjtwqq
Ian's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
440
440
        tree.bzrdir.root_transport.base):
441
441
        branch = None
442
442
        repository = None
443
 
    non_aliases = set(bzrdir.format_registry.keys())
444
 
    non_aliases.difference_update(bzrdir.format_registry.aliases())
445
 
    for key in non_aliases:
 
443
    for key in bzrdir.format_registry.keys():
446
444
        format = bzrdir.format_registry.make_bzrdir(key)
447
445
        if isinstance(format, bzrdir.BzrDirMetaFormat1):
448
446
            if (tree and format.workingtree_format !=
459
457
        candidates.append(key)
460
458
    if len(candidates) == 0:
461
459
        return 'unnamed'
462
 
    candidates.sort()
 
460
    new_candidates = [c for c in candidates if c != 'default']
 
461
    if len(new_candidates) > 0:
 
462
        candidates = new_candidates
463
463
    new_candidates = [c for c in candidates if not
464
464
        bzrdir.format_registry.get_info(c).hidden]
465
465
    if len(new_candidates) > 0:
466
 
        # If there are any non-hidden formats that match, only return those to
467
 
        # avoid listing hidden formats except when only a hidden format will
468
 
        # do.
469
466
        candidates = new_candidates
470
467
    return ' or '.join(candidates)