~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Martin Pool
  • Date: 2010-09-13 08:55:08 UTC
  • mfrom: (5417.1.5 scripts)
  • mto: This revision was merged to the branch mainline in revision 5426.
  • Revision ID: mbp@sourcefrog.net-20100913085508-oz74wnsz53hjd4yf
Merge additional fixes for blank lines in scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
398
398
            (2, 3), None))
399
399
 
400
400
 
 
401
hooks = StatusHooks()
 
402
 
 
403
 
401
404
class StatusHookParams(object):
402
405
    """Object holding parameters passed to post_status hooks.
403
406
 
438
441
            self.old_tree, self.new_tree, self.to_file, self.versioned,
439
442
            self.show_ids, self.short, self.verbose)
440
443
 
441
 
 
442
 
def _show_shelve_summary(params):
443
 
    """post_status hook to display a summary of shelves.
444
 
 
445
 
    :param params: StatusHookParams.
446
 
    """
447
 
    manager = params.new_tree.get_shelf_manager()
448
 
    shelves = manager.active_shelves()
449
 
    if shelves:
450
 
        params.to_file.write('%d shelves exist. '
451
 
            'See "bzr shelve --list" for details.\n' % len(shelves))
452
 
 
453
 
 
454
 
hooks = StatusHooks()
455
 
 
456
 
 
457
 
hooks.install_named_hook('post_status', _show_shelve_summary,
458
 
    'bzr status')
459