hgk: no committer please
authorAndrew Shadura <bugzilla@tut.by>
Tue, 16 Oct 2012 22:19:08 +0200
changeset 17959 542d133ea0a3
parent 17958 0f93bbe8deb7
child 17960 d0d99c8bdf51
hgk: no committer please Generate committer only if we really have it. Update test-hgk.t accordingly.
hgext/hgk.py
tests/test-hgk.t
--- a/hgext/hgk.py	Tue Oct 16 14:54:51 2012 +0200
+++ b/hgext/hgk.py	Tue Oct 16 22:19:08 2012 +0200
@@ -108,10 +108,11 @@
     if lines and lines[-1].startswith('committer:'):
         committer = lines[-1].split(': ')[1].rstrip()
     else:
-        committer = ctx.user()
+        committer = ""
 
     ui.write(("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1])))
-    ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1])))
+    if committer != '':
+        ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1])))
     ui.write(("revision %d\n" % ctx.rev()))
     ui.write(("branch %s\n\n" % ctx.branch()))
 
--- a/tests/test-hgk.t	Tue Oct 16 14:54:51 2012 +0200
+++ b/tests/test-hgk.t	Tue Oct 16 22:19:08 2012 +0200
@@ -11,7 +11,6 @@
   tree a0c8bcbbb45c
   parent 000000000000
   author test 0 0
-  committer test 0 0
   revision 0
   branch default