~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

Merge description into dont-add-conflict-helpers

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_lines = revision.properties['bugs'].split('\n')
 
1987
        bug_rows = [line.split(' ', 1) for line in bug_lines]
 
1988
        fixed_bug_urls = [row[0] for row in bug_rows if
 
1989
                          len(row) > 1 and row[1] == 'fixed']
 
1990
        
 
1991
        if fixed_bug_urls:
 
1992
            return {'fixes bug(s)': ' '.join(fixed_bug_urls)}
 
1993
    return {}
 
1994
 
 
1995
properties_handler_registry.register('bugs_properties_handler',
 
1996
                                     _bugs_properties_handler)
 
1997
 
1983
1998
 
1984
1999
# adapters which revision ids to log are filtered. When log is called, the
1985
2000
# log_rev_iterator is adapted through each of these factory methods.