~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-20 10:36:15 UTC
  • mfrom: (3228 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080220103615-uxw9jc9m6l63ea27
merge bzr.dev; update patch for 1.3

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
 
    for key in bzrdir.format_registry.keys():
 
443
    non_aliases = set(bzrdir.format_registry.keys())
 
444
    non_aliases.difference_update(bzrdir.format_registry.aliases())
 
445
    for key in non_aliases:
444
446
        format = bzrdir.format_registry.make_bzrdir(key)
445
447
        if isinstance(format, bzrdir.BzrDirMetaFormat1):
446
448
            if (tree and format.workingtree_format !=
457
459
        candidates.append(key)
458
460
    if len(candidates) == 0:
459
461
        return 'unnamed'
460
 
    new_candidates = [c for c in candidates if c != 'default']
461
 
    if len(new_candidates) > 0:
462
 
        candidates = new_candidates
 
462
    candidates.sort()
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.
466
469
        candidates = new_candidates
467
470
    return ' or '.join(candidates)