~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-08 01:23:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6263.
  • Revision ID: jelmer@samba.org-20111108012339-zj2efk0kx9rx3zfv
No longer show empty output when only control directory is present.

Show diffs side-by-side

added added

removed removed

Lines of Context:
343
343
            try:
344
344
                repository = a_bzrdir.open_repository()
345
345
            except NoRepositoryPresent:
346
 
                # Return silently; cmd_info already returned NotBranchError
347
 
                # if no controldir could be opened.
348
 
                return
 
346
                lockable = None
 
347
                repository = None
349
348
            else:
350
349
                lockable = repository
351
350
        else:
356
355
        repository = branch.repository
357
356
        lockable = tree
358
357
 
359
 
    lockable.lock_read()
 
358
    if lockable is not None:
 
359
        lockable.lock_read()
360
360
    try:
361
361
        show_component_info(a_bzrdir, repository, branch, tree, verbose,
362
362
                            outfile)
363
363
    finally:
364
 
        lockable.unlock()
 
364
        if lockable is not None:
 
365
            lockable.unlock()
365
366
 
366
367
 
367
368
def show_component_info(control, repository, branch=None, working=None,