diff -ru fastimport_ori/exporter.py fastimport/exporter.py --- fastimport_ori/exporter.py 2015-01-27 14:02:46.000000000 +0100 +++ fastimport/exporter.py 2017-06-02 00:01:50.373291600 +0200 @@ -57,6 +57,7 @@ progress, trace, ) +from bzrlib.log import _compute_revno_str from bzrlib.plugins.fastimport import ( helpers, @@ -417,7 +418,26 @@ # Filter the revision properties. Some metadata (like the # author information) is already exposed in other ways so # don't repeat it here. + message = revobj.message.strip() if self.plain_format: + if 'bugs' in revobj.properties: + fixed_bugs = revobj.properties['bugs'].split('\n') + fixed_bugs = [fixed_bug.split(' ')[0] for fixed_bug in fixed_bugs] + fixed_bugs = [" - " + fixed_bug for fixed_bug in fixed_bugs] + message += "\n\nFixed bugs:\n" + message += "\n".join(fixed_bugs) + + if 'authors' in revobj.properties: + authors = revobj.properties['authors'].split('\n') + if len(authors) > 1: + authors = [" - " + author for author in authors] + message += "\n\nOriginal authors:\n" + message += "\n".join(authors) + + revno = _compute_revno_str(self.branch, revobj.revision_id) + if revno is not None: + message += "\n\n(bzr r" + revno + ")" + properties = None else: properties = revobj.properties @@ -429,7 +449,7 @@ # Build and return the result return commands.CommitCommand(git_ref, mark, author_info, - committer_info, revobj.message.encode("utf-8"), from_, merges, iter(file_cmds), + committer_info, message.encode("utf-8"), from_, merges, iter(file_cmds), more_authors=more_author_info, properties=properties) def _get_revision_trees(self, parent, revision_id):