~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Neil Martinsen-Burrell
  • Date: 2009-12-23 13:45:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4938.
  • Revision ID: nmb@wartburg.edu-20091223134526-9smquzf96yej90yb
include bug fixes in log output

Show diffs side-by-side

added added

removed removed

Lines of Context:
1980
1980
 
1981
1981
properties_handler_registry = registry.Registry()
1982
1982
 
 
1983
# Use the properties handlers to print out bug information if available
 
1984
def _bugs_properties_handler(revision):
 
1985
    if revision.properties.has_key('bugs'):
 
1986
        bug_list =  [val.split()[0] for val in
 
1987
                     revision.properties['bugs'].split('\n') if
 
1988
                     val.split()[1] == 'fixed'
 
1989
                    ]
 
1990
        if bug_list:
 
1991
            return {'fixes bug(s)': ' '.join(bug_list)}
 
1992
    return {}
 
1993
 
 
1994
properties_handler_registry.register('bugs_properties_handler',
 
1995
                                     _bugs_properties_handler)
 
1996
 
1983
1997
 
1984
1998
# adapters which revision ids to log are filtered. When log is called, the
1985
1999
# log_rev_iterator is adapted through each of these factory methods.