Mercurial > hg
comparison hgext/hgk.py @ 6768:e3bb005373b1
hgk: fix parent breakage
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 11 Jul 2008 18:46:02 -0500 |
parents | 4faaa0535ea7 |
children | fdf5980bd010 |
comparison
equal
deleted
inserted
replaced
6767:80605a8127e0 | 6768:e3bb005373b1 |
---|---|
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" % p) |
108 | |
109 date = ctx.date() | 109 date = ctx.date() |
110 description = ctx.description().replace("\0", "") | 110 description = ctx.description().replace("\0", "") |
111 lines = description.splitlines() | 111 lines = description.splitlines() |
112 if lines and lines[-1].startswith('committer:'): | 112 if lines and lines[-1].startswith('committer:'): |
113 committer = lines[-1].split(': ')[1].rstrip() | 113 committer = lines[-1].split(': ')[1].rstrip() |