hgext/hgk.py
changeset 24604 ce8dd4fd2d5d
parent 24517 c2c1ce5e6db1
child 25186 80c5b2666a96
--- a/hgext/hgk.py	Sat Mar 14 20:16:35 2015 +0900
+++ b/hgext/hgk.py	Fri Apr 03 22:44:25 2015 +0200
@@ -117,15 +117,11 @@
 
     date = ctx.date()
     description = ctx.description().replace("\0", "")
-    lines = description.splitlines()
-    if lines and lines[-1].startswith('committer:'):
-        committer = lines[-1].split(': ')[1].rstrip()
-    else:
-        committer = ""
+    ui.write(("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1])))
 
-    ui.write(("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1])))
-    if committer != '':
-        ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1])))
+    if 'committer' in ctx.extra():
+        ui.write(("committer %s\n" % ctx.extra()['committer']))
+
     ui.write(("revision %d\n" % ctx.rev()))
     ui.write(("branch %s\n" % ctx.branch()))
     if obsolete.isenabled(repo, obsolete.createmarkersopt):