tags 705245 + patch quit Daniel Kahn Gillmor wrote:
> I also note from above that git-bzr seems to have failed to pick up > the "author" metadata from bzr, and conflated "committer" with author. How about this patch? -- >8 -- Subject: remote-bzr: respect bzr "author" field in import Like git, bzr has support for keeping track of the author of a commit separately from the committer. Import that value. A Bazaar commit can have any number of authors. If there are zero, the get_apparent_authors() function is advertised to return the committer, so we can use that. If there is more than one, let's use the first one and ignore the rest. A Bazaar commit only records one time stamp, instead of a separate authorship and commit timestamp like git has. That means that the imported commits will always have the same author date and commit date. This patch only affects how bzr commits are fetched. The git author is still not exported during pushes. Reported-by: Daniel Kahn Gillmor <d...@fifthhorseman.net> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- contrib/remote-helpers/git-remote-bzr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index c5822e4..de6e471 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -258,9 +258,10 @@ def export_branch(branch, name): parents = rev.parent_ids time = rev.timestamp tz = rev.timezone + author = rev.get_apparent_authors()[0].encode('utf-8') + author = "%s %u %s" % (fixup_user(author), time, gittz(tz)) committer = rev.committer.encode('utf-8') committer = "%s %u %s" % (fixup_user(committer), time, gittz(tz)) - author = committer msg = rev.message.encode('utf-8') msg += '\n' -- 1.8.2.1 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org