~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-23 19:11:01 UTC
  • mfrom: (6472.1.1 merge-2.5)
  • Revision ID: pqm@pqm.ubuntu.com-20120223191101-x6g60ci59rhkvp3e
(jelmer) Merge bzr/2.5. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
            repository._format.get_format_description())
201
201
 
202
202
 
203
 
def _show_locking_info(repository, branch=None, working=None, outfile=None):
 
203
def _show_locking_info(repository=None, branch=None, working=None,
 
204
        outfile=None):
204
205
    """Show locking status of working, branch and repository."""
205
 
    if (repository.get_physical_lock_status() or
 
206
    if (repository and repository.get_physical_lock_status() or
206
207
        (branch and branch.get_physical_lock_status()) or
207
208
        (working and working.get_physical_lock_status())):
208
209
        outfile.write('\n')
413
414
    if branch is not None:
414
415
        show_committers = verbose >= 2
415
416
        stats = _show_branch_stats(branch, show_committers, outfile)
416
 
    else:
 
417
    elif repository is not None:
417
418
        stats = repository.gather_stats()
418
 
    if branch is None and working is None:
 
419
    if branch is None and working is None and repository is not None:
419
420
        _show_repository_info(repository, outfile)
420
 
    _show_repository_stats(repository, stats, outfile)
 
421
    if repository is not None:
 
422
        _show_repository_stats(repository, stats, outfile)
421
423
 
422
424
 
423
425
def describe_layout(repository=None, branch=None, tree=None, control=None):