~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Vincent Ladeuil
  • Date: 2010-10-07 06:08:01 UTC
  • mto: This revision was merged to the branch mainline in revision 5491.
  • Revision ID: v.ladeuil+lp@free.fr-20101007060801-wfdhizfhfmctl8qa
Fix some typos and propose a release planning.

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
 
 
404
401
class StatusHookParams(object):
405
402
    """Object holding parameters passed to post_status hooks.
406
403
 
441
438
            self.old_tree, self.new_tree, self.to_file, self.versioned,
442
439
            self.show_ids, self.short, self.verbose)
443
440
 
 
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