remote-bzr: set author if available
[gitweb.git] / contrib / remote-helpers / git-remote-bzr
index f818e93f1192d779a8ac8e3694f217f481af98db..a99a92412fe3e837bd732df54785f54562961262 100755 (executable)
@@ -266,7 +266,12 @@ def export_branch(branch, name):
         tz = rev.timezone
         committer = rev.committer.encode('utf-8')
         committer = "%s %u %s" % (fixup_user(committer), time, gittz(tz))
-        author = committer
+        authors = rev.get_apparent_authors()
+        if authors:
+            author = authors[0].encode('utf-8')
+            author = "%s %u %s" % (fixup_user(author), time, gittz(tz))
+        else:
+            author = committer
         msg = rev.message.encode('utf-8')
 
         msg += '\n'