hgk: fix parent breakage

This commit is contained in:
Matt Mackall 2008-07-11 18:46:02 -05:00
parent 21163fdc2f
commit f706d75a90

View File

@ -102,10 +102,10 @@ def catcommit(ui, repo, n, prefix, ctx=None):
nlprefix = '\n' + prefix; nlprefix = '\n' + prefix;
if ctx is None: if ctx is None:
ctx = repo[n] ctx = repo[n]
(p1, p2) = ctx.parents()
ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
if p1: ui.write("parent %s\n" % short(p1.node())) for p in ctx.parents():
if p2: ui.write("parent %s\n" % short(p2.node())) ui.write("parent %s\n" % p)
date = ctx.date() date = ctx.date()
description = ctx.description().replace("\0", "") description = ctx.description().replace("\0", "")
lines = description.splitlines() lines = description.splitlines()