~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Jelmer Vernooij
  • Date: 2009-05-01 14:29:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4321.
  • Revision ID: jelmer@samba.org-20090501142906-7zj8hcpp9igzuyi4
Add repository argument to 'repository' info hook, per Roberts review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
            'the repository.\n')
302
302
 
303
303
 
304
 
def _show_repository_stats(stats, outfile):
 
304
def _show_repository_stats(repository, stats, outfile):
305
305
    """Show statistics about a repository."""
306
306
    f = StringIO()
307
307
    if 'revisions' in stats:
310
310
    if 'size' in stats:
311
311
        f.write('  %8d KiB\n' % (stats['size']/1024))
312
312
    for hook in hooks['repository']:
313
 
        hook(stats, f)
 
313
        hook(repository, stats, f)
314
314
    if f.getvalue() != "":
315
315
        outfile.write('\n')
316
316
        outfile.write('Repository:\n')
388
388
        stats = repository.gather_stats()
389
389
    if branch is None and working is None:
390
390
        _show_repository_info(repository, outfile)
391
 
    _show_repository_stats(stats, outfile)
 
391
    _show_repository_stats(repository, stats, outfile)
392
392
 
393
393
 
394
394
def describe_layout(repository=None, branch=None, tree=None):