~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Patch Queue Manager
  • Date: 2011-10-06 08:34:03 UTC
  • mfrom: (6191.2.1 843900-url-nameerror)
  • Revision ID: pqm@pqm.ubuntu.com-20111006083403-jnsw0exlirg01aed
(mbp) error message without traceback on invalid ubuntu/debian url (bug
 843900) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from bzrlib import (
24
24
    bzrdir,
25
 
    controldir,
26
25
    errors,
27
26
    hooks as _mod_hooks,
28
27
    osutils,
337
336
                repository = a_bzrdir.open_repository()
338
337
            except NoRepositoryPresent:
339
338
                # Return silently; cmd_info already returned NotBranchError
340
 
                # if no controldir could be opened.
 
339
                # if no bzrdir could be opened.
341
340
                return
342
341
            else:
343
342
                lockable = repository
452
451
        branch.user_url != tree.user_url):
453
452
        branch = None
454
453
        repository = None
455
 
    non_aliases = set(controldir.format_registry.keys())
456
 
    non_aliases.difference_update(controldir.format_registry.aliases())
 
454
    non_aliases = set(bzrdir.format_registry.keys())
 
455
    non_aliases.difference_update(bzrdir.format_registry.aliases())
457
456
    for key in non_aliases:
458
 
        format = controldir.format_registry.make_bzrdir(key)
 
457
        format = bzrdir.format_registry.make_bzrdir(key)
459
458
        if isinstance(format, bzrdir.BzrDirMetaFormat1):
460
459
            if (tree and format.workingtree_format !=
461
460
                tree._format):
473
472
        return 'unnamed'
474
473
    candidates.sort()
475
474
    new_candidates = [c for c in candidates if not
476
 
        controldir.format_registry.get_info(c).hidden]
 
475
        bzrdir.format_registry.get_info(c).hidden]
477
476
    if len(new_candidates) > 0:
478
477
        # If there are any non-hidden formats that match, only return those to
479
478
        # avoid listing hidden formats except when only a hidden format will