/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/plugins/commitfromnews/committemplate.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-17 00:47:52 UTC
  • mfrom: (7182 work)
  • mto: This revision was merged to the branch mainline in revision 7305.
  • Revision ID: jelmer@jelmer.uk-20181117004752-6ywampe5pfywlby4
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
            return self.merge_message(content)
64
64
        else:
65
65
            # Get a diff. XXX Is this hookable? I thought it was, can't find it
66
 
            # though.... add DiffTree.diff_factories. Sadly thats not at the 
 
66
            # though.... add DiffTree.diff_factories. Sadly thats not at the
67
67
            # right level: we want to identify the changed lines, not have the
68
 
            # final diff: because we want to grab the sections for regions 
 
68
            # final diff: because we want to grab the sections for regions
69
69
            # changed in new version of the file. So for now a direct diff
70
70
            # using patiencediff is done.
71
 
            old_revision = self.commit.basis_tree.get_file_revision(
72
 
                old_path, found_entry.file_id)
 
71
            old_revision = self.commit.basis_tree.get_file_revision(old_path)
73
72
            needed = [(found_entry.file_id, found_entry.revision, 'new'),
74
73
                      (found_entry.file_id, old_revision, 'old')]
75
74
            contents = self.commit.builder.repository.iter_files_bytes(needed)
96
95
                    bugids.extend(_BUG_MATCH.findall(line))
97
96
                self.commit.revprops['bugs'] = \
98
97
                    bugtracker.encode_fixes_bug_urls(
99
 
                        [bt.get_bug_url(bugid) for bugid in bugids])
 
98
                        [(bt.get_bug_url(bugid), bugtracker.FIXED)
 
99
                         for bugid in bugids])
100
100
            return self.merge_message(''.join(new_lines))
101
101
 
102
102
    def merge_message(self, new_message):