# HG changeset patch # User Andrew Shadura # Date 2012-10-16 20:19:08 # Node ID 542d133ea0a3192a1c9aac95acc2b9ac72a43fde # Parent 0f93bbe8deb7794dd362245ac9e89afa210a3bce hgk: no committer please Generate committer only if we really have it. Update test-hgk.t accordingly. 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\n" % ctx.branch())) diff --git a/tests/test-hgk.t b/tests/test-hgk.t --- a/tests/test-hgk.t +++ b/tests/test-hgk.t @@ -11,7 +11,6 @@ Minimal hgk check tree a0c8bcbbb45c parent 000000000000 author test 0 0 - committer test 0 0 revision 0 branch default