Mercurial > hg
comparison hgext/hgk.py @ 17959:542d133ea0a3
hgk: no committer please
Generate committer only if we really have it.
Update test-hgk.t accordingly.
author | Andrew Shadura <bugzilla@tut.by> |
---|---|
date | Tue, 16 Oct 2012 22:19:08 +0200 |
parents | a08775ec89f2 |
children | cf72fd8b3072 |
comparison
equal
deleted
inserted
replaced
17958:0f93bbe8deb7 | 17959:542d133ea0a3 |
---|---|
106 description = ctx.description().replace("\0", "") | 106 description = ctx.description().replace("\0", "") |
107 lines = description.splitlines() | 107 lines = description.splitlines() |
108 if lines and lines[-1].startswith('committer:'): | 108 if lines and lines[-1].startswith('committer:'): |
109 committer = lines[-1].split(': ')[1].rstrip() | 109 committer = lines[-1].split(': ')[1].rstrip() |
110 else: | 110 else: |
111 committer = ctx.user() | 111 committer = "" |
112 | 112 |
113 ui.write(("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1]))) | 113 ui.write(("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1]))) |
114 ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1]))) | 114 if committer != '': |
115 ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1]))) | |
115 ui.write(("revision %d\n" % ctx.rev())) | 116 ui.write(("revision %d\n" % ctx.rev())) |
116 ui.write(("branch %s\n\n" % ctx.branch())) | 117 ui.write(("branch %s\n\n" % ctx.branch())) |
117 | 118 |
118 if prefix != "": | 119 if prefix != "": |
119 ui.write("%s%s\n" % (prefix, | 120 ui.write("%s%s\n" % (prefix, |