~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-10 06:09:30 UTC
  • mfrom: (5409.4.1 ui-factory)
  • Revision ID: pqm@pqm.ubuntu.com-20100910060930-0ukm0h7txwadstll
(mbp) split out ui-factory docs (Martin Pool)

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