/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/log.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 10:50:21 UTC
  • mfrom: (7164 work)
  • mto: This revision was merged to the branch mainline in revision 7165.
  • Revision ID: jelmer@jelmer.uk-20181116105021-xl419v2rh4aus1au
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2138
2138
 
2139
2139
# Use the properties handlers to print out bug information if available
2140
2140
def _bugs_properties_handler(revision):
 
2141
    ret = {}
2141
2142
    if 'bugs' in revision.properties:
2142
2143
        bug_lines = revision.properties['bugs'].split('\n')
2143
2144
        bug_rows = [line.split(' ', 1) for line in bug_lines]
2144
2145
        fixed_bug_urls = [row[0] for row in bug_rows if
2145
2146
                          len(row) > 1 and row[1] == 'fixed']
2146
 
 
 
2147
        related_bug_urls = [row[0] for row in bug_rows if
 
2148
                            len(row) > 1 and row[1] == 'related']
2147
2149
        if fixed_bug_urls:
2148
 
            return {ngettext('fixes bug', 'fixes bugs', len(fixed_bug_urls)):\
2149
 
                    ' '.join(fixed_bug_urls)}
2150
 
    return {}
 
2150
            ret[ngettext('fixes bug', 'fixes bugs', len(fixed_bug_urls))] = (
 
2151
                ' '.join(fixed_bug_urls))
 
2152
        if related_bug_urls:
 
2153
            ret[ngettext('related bug', 'related bugs', len(related_bug_urls))] = (
 
2154
                ' '.join(related_bug_urls))
 
2155
    return ret
2151
2156
 
2152
2157
properties_handler_registry.register('bugs_properties_handler',
2153
2158
                                     _bugs_properties_handler)