Mercurial > hg
comparison hgext/hgk.py @ 6800:cc7114d96548
hgk: ctx.parents() problem introduced by 2d54e7c1e69d
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 05 Jul 2008 14:35:36 +0200 |
parents | 4faaa0535ea7 |
children | fdf5980bd010 |
comparison
equal
deleted
inserted
replaced
6799:12d1e1e79faf | 6800:cc7114d96548 |
---|---|
100 | 100 |
101 def catcommit(ui, repo, n, prefix, ctx=None): | 101 def catcommit(ui, repo, n, prefix, ctx=None): |
102 nlprefix = '\n' + prefix; | 102 nlprefix = '\n' + prefix; |
103 if ctx is None: | 103 if ctx is None: |
104 ctx = repo[n] | 104 ctx = repo[n] |
105 (p1, p2) = ctx.parents() | |
106 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? | 105 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? |
107 if p1: ui.write("parent %s\n" % short(p1.node())) | 106 for p in ctx.parents(): |
108 if p2: ui.write("parent %s\n" % short(p2.node())) | 107 ui.write("parent %s\n" % short(p.node())) |
109 date = ctx.date() | 108 date = ctx.date() |
110 description = ctx.description().replace("\0", "") | 109 description = ctx.description().replace("\0", "") |
111 lines = description.splitlines() | 110 lines = description.splitlines() |
112 if lines and lines[-1].startswith('committer:'): | 111 if lines and lines[-1].startswith('committer:'): |
113 committer = lines[-1].split(': ')[1].rstrip() | 112 committer = lines[-1].split(': ')[1].rstrip() |