~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Aaron Bentley
  • Date: 2007-03-20 18:15:59 UTC
  • mto: This revision was merged to the branch mainline in revision 2528.
  • Revision ID: abentley@panoramicfeedback.com-20070320181559-gdtotm3er7a0zr0b
Add short format description

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
    verbose=1):
303
303
    """Write info about all bzrdir components to stdout"""
304
304
    verbose = {False: 1, True: 2}.get(verbose, verbose)
305
 
    print describe_layout(repository, branch, working)
 
305
    layout = describe_layout(repository, branch, working)
 
306
    format = describe_format(control, repository, branch, working)
 
307
    print "%s (format: %s)" % (layout, format)
306
308
    _show_location_info(repository, branch, working)
307
309
    if branch is not None:
308
310
        _show_related_info(branch)
378
380
    If no matching candidate is found, "unnamed" is returned.
379
381
    """
380
382
    candidates  = []
 
383
    if (branch is not None and tree is not None and
 
384
        branch.bzrdir.root_transport.base !=
 
385
        tree.bzrdir.root_transport.base):
 
386
        branch = None
 
387
        repository = None
381
388
    for key in bzrdir.format_registry.keys():
382
389
        format = bzrdir.format_registry.make_bzrdir(key)
383
390
        if isinstance(format, bzrdir.BzrDirMetaFormat1):
398
405
    new_candidates = [c for c in candidates if c != 'default']
399
406
    if len(new_candidates) > 0:
400
407
        candidates = new_candidates
 
408
    new_candidates = [c for c in candidates if not
 
409
        bzrdir.format_registry.get_info(c).hidden]
 
410
    if len(new_candidates) > 0:
 
411
        candidates = new_candidates
401
412
    return ' / '.join(candidates)
402
413
 
403
414
@deprecated_function(zero_eight)