Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/hgk.py @ 4040:cc08d2543593
hgk: remove embedded nulls in descriptions
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 23 Jan 2007 17:41:53 -0600 |
parents | 180670f14045 |
children | 39001f4b7d99 |
comparison
equal
deleted
inserted
replaced
4038:5ae460b1f6f0 | 4040:cc08d2543593 |
---|---|
69 (p1, p2) = ctx.parents() | 69 (p1, p2) = ctx.parents() |
70 print "tree %s" % (hg.short(ctx.changeset()[0])) # use ctx.node() instead ?? | 70 print "tree %s" % (hg.short(ctx.changeset()[0])) # use ctx.node() instead ?? |
71 if p1: print "parent %s" % (hg.short(p1.node())) | 71 if p1: print "parent %s" % (hg.short(p1.node())) |
72 if p2: print "parent %s" % (hg.short(p2.node())) | 72 if p2: print "parent %s" % (hg.short(p2.node())) |
73 date = ctx.date() | 73 date = ctx.date() |
74 description = ctx.description() | 74 description = ctx.description().replace("\0", "") |
75 lines = description.splitlines() | 75 lines = description.splitlines() |
76 if lines and lines[-1].startswith('committer:'): | 76 if lines and lines[-1].startswith('committer:'): |
77 committer = lines[-1].split(': ')[1].rstrip() | 77 committer = lines[-1].split(': ')[1].rstrip() |
78 else: | 78 else: |
79 committer = ctx.user() | 79 committer = ctx.user() |