[PATCH 4 of 9] hgk: no committer please

Andrew Shadura bugzilla at tut.by
Wed Nov 7 09:15:12 CST 2012


# HG changeset patch
# User Andrew Shadura <bugzilla at tut.by>
# Date 1350418748 -7200
# Node ID d4650496805c0c5f4e7d7cac1c67789f0faeccb8
# Parent  6edb0dadd5c0777f6718666e4017cd1e4cfbb148
hgk: no committer please

Generate committer only if we really have it (eh, do we need it at all?)

diff --git a/hgext/hgk.py b/hgext/hgk.py
--- a/hgext/hgk.py
+++ b/hgext/hgk.py
@@ -108,10 +108,11 @@ def catcommit(ui, repo, n, prefix, ctx=N
     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" % ctx.branch())
     ui.write("phase %s\n\n" % phases.phasenames[ctx.phase()])


More information about the Mercurial-devel mailing list